JavaPins - Stories tagged with swing
1
Pins

How to add ChangeListener to JToggleButton?

posted by gowthamguthagowthamgutha 183 days, 20 hours, 52 minutes ago
Saturday, October 19, 2013 10:54:02 AM GMT
Here is how to add ChangeListener to JToggleButton. In this example, we are going to make the JPanel semi transparent when the JToggleButton is selected and fully transparent when it is deselected. You will also learn (if you haven't), how to set background image in JFrame in this post. Here is the full code, with helpful commentaries. import javax.swing.*; import java.awt.*; import javax.swing.event.*; class ChangeListenerForJToggleButton extends JFrame { JToggleButton jt; JPanel jp; GridB... (more)
category: JAVA | clicked: 0 | comment | | source: java-demos.blogspot.com
tags: advanced-java, event-handling, swing
1
Pins

How to use FileFilter in JFileChooser?

posted by gowthamguthagowthamgutha 185 days, 12 hours, 32 minutes ago
Thursday, October 17, 2013 7:13:21 PM GMT
The javax.swing.filechooser.FileFilter class is used to set custom file type option in JFileChooser. You might already have noticed the setFileFilter() and addChoosableFileFilter() methods in the JFileChooser class. Now, let us see how to do this. Let us talk a bit about this class before we do the program. A FileFilter is used to describe what files a user can select. The FileFilter class is an abstract class containing two abstract methods public String getDescription(): This is the description... (more)
category: JAVA | clicked: 0 | comment | | source: java-demos.blogspot.com
tags: file, jfilechooser, swing
1
Pins

How to set look and feel via command line?

posted by gowthamguthagowthamgutha 185 days, 12 hours, 33 minutes ago
Thursday, October 17, 2013 7:12:26 PM GMT
Here is how you can set the look and feel of a GUI application via the command prompt. The command line parameters helps us do this. Here is a simple program, that consists of the most typical GUI code. In this program, we will not set the look and feel, instead we set it via the command line. Here is how to do it. import javax.swing.; import java.awt.; class LookAndFeelDemo extends JFrame { JButton jb; JTextField jt; JMenuBar mbar; JMenu menu; JMenuItem m1... (more)
category: JAVA | clicked: 1 | comment | | source: java-demos.blogspot.com
tags: Java, lookandfeel, swing
1
Pins

Java Swing: Automatically Resize Table Columns

posted by anishaanisha 580 days, 11 hours, 15 minutes ago
Monday, September 17, 2012 8:30:08 PM GMT
When you use JTables in Swing, you will notice that by default, all columns have the same size. The programmer can decide to set a specific width on each column, but he does not always know what kind of data will show up in the table and what width is required for each column. This video provides the code for an easy solution to this problem, automatically resizing table columns based on the data in the table. (more)
category: Java EE | clicked: 2 | comment | | source: www.java-tv.com
tags: auto resized, swing, table
1
Pins

Java Desktop and Android Development at the Coal Face: Swing to Android

published 590 days, 13 hours, 9 minutes ago posted by anishaanisha 591 days, 13 hours, 28 minutes ago
Friday, September 07, 2012 6:36:14 PM GMT Thursday, September 06, 2012 6:17:32 PM GMT
Well its been a while since I updated my blog. Basically I finished a contract back in June last year and decided to take some time off. I've been doing anything other that work really :) Actually I have been doing some of my own programming projects to keep my hand in, basically a bit of Swing and a fair bit of Android. (more)
category: Java EE | clicked: 3 | comment | | source: webbyit.blogspot.in
tags: Android, swing
1
Pins

Integrating JavaFX and Swing « Pixel Duke

published 599 days, 17 hours, 30 minutes ago posted by anishaanisha 600 days, 13 hours, 20 minutes ago
Wednesday, August 29, 2012 2:15:40 PM GMT Tuesday, August 28, 2012 6:25:10 PM GMT
I’ve just finished rewriting a component of my app that was using Swing and now is using JavaFX, I’ve ended up with a JavaFX component that integrates with the larger swing app. It is a large app and the rewrite took me a while, in the end everything worked fine and I’m glad I did it. (more)
category: Java EE | clicked: 5 | comment | | source: pixelduke.wordpress.com
tags: integartion, JavaFX, swing
1
Pins

Chat bubble in java swing « harryjoy

published 600 days, 13 hours, 13 minutes ago posted by anishaanisha 601 days, 16 hours, 13 minutes ago
Tuesday, August 28, 2012 6:32:53 PM GMT Monday, August 27, 2012 3:32:28 PM GMT
This article will explain you “how to draw chat bubble in  java swing application?” Chat bubble is same as call-out or thought bubble. Today most of the chat application is showing conversion in this format, so this article will help you to do the same in desktop application made in java swing. Following class is used to draw first chat bubble: (Arrow at the left side of bubble) (more)
category: JAVA | clicked: 8 | comment | | source: harryjoy.com
tags: Chat bubble, Java, swing
1
Pins

Inspired by Actual Events: Integrating JavaFX 2.0 with Swing and SWT

posted by anishaanisha 616 days, 12 hours, 6 minutes ago
Sunday, August 12, 2012 7:39:43 PM GMT
One of the improvements in JavaFX with JavaFX 2.0 has been greater ease of interoperability with Swing and SWT. Several online resources document how this is done. These include Integrating JavaFX into Swing Applications and SWT Interop. (more)
category: Java EE | clicked: 2 | comment | | source: marxsoftware.blogspot.in
tags: JavaFX, swing, SWT
1
Pins

Java Swing Tips: Rounded corner JComboBox border

posted by anishaanisha 617 days, 14 hours, 27 minutes ago
Saturday, August 11, 2012 5:18:28 PM GMT
download src.zipsvn repositoryCodeclass RoundedCornerBorder extends AbstractBorder { @Override public void paintBorder( Component c, Graphics g, int x, int y, int width, int height) { Graphics2D g2 = (Graphics2D)g.create(); g2.setRenderingHint( RenderingHints.KEYANTIALIASING, RenderingHints.VALUEANTIALIAS_ON); (more)
category: Java EE | clicked: 11 | comment | | source: java-swing-tips.blogspot.in
tags: JComboBox, rounded corner, swing
1
Pins

Java Swing Tips: Translucent JPopupMenu

posted by anishaanisha 617 days, 14 hours, 28 minutes ago
Saturday, August 11, 2012 5:17:15 PM GMT
download src.zipsvn repositoryCodeclass TranslucentPopupMenu extends JPopupMenu{ private static final Color ALPHAZERO = new Color(0, true); private static final Color POPUPBACK = new Color(250,250,250,200); private static final Color POPUPLEFT = new Color(230,230,230,200); private static final int LEFTWIDTH = 24; @Override public boolean isOpaque() { return false; } @Override public void updateUI() { super.updateUI(); //Test: boolean isNimbus = UIManager.getBorder("Popup... (more)
category: Java EE | clicked: 3 | comment | | source: java-swing-tips.blogspot.in
tags: swing, translucent JPopupMenu
1
Pins

Rich Java Blog: Swing applications deployment on Windows

posted by anishaanisha 617 days, 14 hours, 33 minutes ago
Saturday, August 11, 2012 5:13:03 PM GMT
I thought I'd start another series of posts about deploying Java applications on different platforms. This is one of the commonly overlooked aspects of application development, so it would be useful to shed some light on it. This series will cover creating native distribution packages for Windows, Mac OS X and Linux (RPM and DEB packages). (more)
category: Java EE | clicked: 0 | comment | | source: www.richjavablog.com
tags: Deployment, swing, Windows
1
Pins

Rich Java Blog: Swing applications deployment on Linux: DEB packages

posted by anishaanisha 617 days, 14 hours, 33 minutes ago
Saturday, August 11, 2012 5:12:10 PM GMT
Deploying Java Swing applications on Linux could be a pain, mostly due to differences in distributions, desktop environments and package management. Two of the most widely used package management systems are DEB and RPM. In today's post, I'm gonna try to create .DEB package for my sample Swing application. (more)
category: Java EE | clicked: 1 | comment | | source: www.richjavablog.com
tags: DEB package, linux, swing
1
Pins

InvokeLater and InvokeAndWait in Java Swing (an example tutorial)

posted by anishaanisha 621 days, 12 hours, 9 minutes ago
Tuesday, August 07, 2012 7:36:12 PM GMT
Everyone who is doing programming in java swing has to come across invokeAndWait and invokeLater provided by SwingUtilites. In this java swing tutorial we will learn about both invokerLater and invokewait method. In first part we will mostly focus on invokeLater and will find answers of questions like What is invokeLater, how to use invokelater in java swing, example of invokelater in swing etc while in second part of this invokeLater tutorial we will learn more about invokeAndWait method in java swing a... (more)
category: Java EE | clicked: 2 | comment | | source: javarevisited.blogspot.in
tags: example, InvokeAnd wait, InvokeLater, swing
1
Pins

Embedding HTML into Java Swing Applications

posted by anishaanisha 634 days, 18 hours, 21 minutes ago
Wednesday, July 25, 2012 1:24:44 PM GMT
HTML in Swing applications? Yes, you have read it right. Swing doesn’t provide components to embed HTML and I have seen lot of people asking how can we add html content in Swing applications. Your concerns have been addressed by the latest release of JavaFX which is JavaFX 2.0. You might wonder what this JavaFX is, so let me just touch upon that as well. JavaFX is the RIA platform envisaged by Sun Microsystems as the next UI toolkit for Java, as Swing has been around for a long time and has started to a... (more)
category: Java EE | clicked: 0 | comment | | source: www.javabeat.net
tags: html, swing
1
Pins

Using JavaFX Chart API to add charts to Swing applications

posted by anishaanisha 634 days, 18 hours, 22 minutes ago
Wednesday, July 25, 2012 1:23:41 PM GMT
In our previous post we looked at how we can embed JavaFX components into Swing applications. As Java Swing lacks Charting API, we can make use of the JavaFX Chart API and not depend on other 3rd party libraries like JFreeChart and others. The javafx.scene.chart is the package which contains all the charting related classes. In this example we will look at creating Scatter Charts and Bar Charts which are categorized as XYCharts which is nothing but these charts are plotted on a X and Y axis. The classes ... (more)
category: Java EE | clicked: 1 | comment | | source: www.javabeat.net
tags: Java FX, swing
2
Pins

How to terminate Java application programatically

posted by javabuddyjavabuddy 660 days, 17 hours, 20 minutes ago
Friday, June 29, 2012 2:25:13 PM GMT
There are multiple ways to close or terminate Java application based upon whether its core Java server side application or client side Swing GUI. This post discusses few of those methods like System.exit(), EXITONCLOSE etc (more)
category: JAVA | clicked: 10 | comment | | source: javarevisited.blogspot.sg
tags: Java, swing
1
Pins

Making a JTable in swing using Java

published 665 days, 21 hours, 25 minutes ago posted by jamesjames 666 days, 11 hours, 44 minutes ago
Sunday, June 24, 2012 10:20:43 AM GMT Saturday, June 23, 2012 8:01:57 PM GMT
In this article you will see how create a JTable. This table can be used to populate the data been extracted from the database and then showing it in an interactive manner.add to favorites This can be helpful in situation where you have a lots of data and you want to show that data in a proper way on the screen. Lets start with the explanation. First we will import all the required classes. Listing 1: Importing classes import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.JScroll... (more)
category: JAVA | clicked: 5 | comment | | source: mrbool.com
tags: Jtable, swing
1
Pins

Synthetica Look And Feel Java Swing : JSupport - Java Srilankan Support

posted by ankyanky 679 days, 12 hours, 40 minutes ago
Sunday, June 10, 2012 7:05:39 PM GMT
Here I am going to explain how to apply Synthetica Look And Feel to a JFrame in Netbeans,in the previous tutorial I was explained how to apply Nimbus Look and Feel Java Swing to a JFrame.You will be able to apply SyntheticaSkyMetallicLookAndFeel SyntheticaBlueMoonLookAndFeel SyntheticaBlueIceLookAndFeel SyntheticaWhiteVisionLookAndFeel and SystemLookAndFeel which will your OS look and feel. To apply Synthetica look and feel you must add Synthetica libraries to your project class path. This code will re... (more)
category: JAVA | clicked: 6 | comment | | source: javasrilankansupport.blogspot.in
tags: Java, Look And Feel, swing, Synthetica
1
Pins

Synthetica Look And Feel Java Swing

published 679 days, 17 hours, 22 minutes ago posted by pankajsharmapankajsharma 680 days, 11 hours, 49 minutes ago
Sunday, June 10, 2012 2:24:01 PM GMT Saturday, June 09, 2012 7:56:33 PM GMT
Synthetica Look And Feel Java Swing How to Apply Synthetica Look And Feel to JFrame in Netbeans. Here I am going to explain how to apply Synthetica Look And Feel to a JFrame in Netbeans,in the previous tutorial I was explained how to apply Nimbus Look and Feel Java Swing to a JFrame.You will be able to apply (more)
category: JAVA | clicked: 5 | comment | | source: javasrilankansupport.blogspot.com
tags: swing, Synthetica
1
Pins

A Simple Data Binding Framework | JavaWorld's Daily Brew

published 685 days, 16 hours, 16 minutes ago posted by ankyanky 685 days, 18 hours, 26 minutes ago
Monday, June 04, 2012 3:29:40 PM GMT Monday, June 04, 2012 1:19:52 PM GMT
Data binding is a technique for binding two data sources together and keeping these data sources synchronized. A subset of data binding is UI data binding, in which an application's domain model is synchronized with its UI elements. Note: Data binding can be classified as unidirectional or bidirectional. With unidirectional data binding, data source B is bound to data source A, but A is not bound to B. Changes made to A are reflected by B, but changes made to B are not reflected by A. In contrast, bidire... (more)
category: Architecture | clicked: 13 | comment | | source: www.javaworld.com
tags: Architecture, Binding, Data, Framework, Java, JavaFX, swing
Previous 1 2 Next