Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips

Swing - Page 2

21-40 of 63     Previous     Next
Provide Data Tip For JTable Columns
by Behrouz Fallahi
Cell data in a table may exceed the width of its column. It is a good, user-friendly, idea to have ToolTips appear in a cell showing the entire cell data as the user brings the mouse over the cell. ...
JFrame Look and Feel
by DevX Pro
Is there any way I can make a JFrame look like JInternalFrame? It looks bad at runtime when you change the look-and-feel, but the main frame doesn't change.
Display HTML Pages in Your Apps
by Behrouz Fallahi
You can use javax.swing.JTextPane to display simple HTML page. ...
Detect Swing Version
by Behrouz Fallahi
Sun changed swing naming convention from com.sun.java.swing to javax.swing.
Detect if Swing is Installed
by Behrouz Fallahi
Sometimes it is useful to know if Swing is installed in a Java ...
Center Your Frames/Dialogs
by Behrouz Fallahi
You can find many tips on how to center a window within the screen, but ...
by DevX Pro
When creating an input dialog box with JOptionPane.showInputDialog, is it possible to have a masking character, such as the * for password input?
by DevX Pro
How do I use the ProgressMonitor class?
Dynamically Resize Your JLabels
by Behrouz Fallahi
There is a simple way to resize your javax.swing.JLabels to the text ...
Window Maximization
by DevX Pro
How do you set the maximized state of a window within code?
Set a Non-Existing Item in a JComboBox's Item List
by Xiang Li
You can programmatically set an item in a JComboBox when the item is not in the combo box's item list using an editable JComboBox. An editable combo box acts like a text field as well as a ...
Modify Swing's Default Values
by Behrouz Fallahi
A previous tip, "Get a Hold of Swing Defaults," shows how to obtain the default settings for Swing components. It is ...
Get a Hold of Swing Defaults
by Behrouz Fallahi
Swing is one of the best things that happened to Java GUI developers. At the heart of Swing is the javax.swing.UIManager class (com.sun.java.swing.UIManager for Swing 1.03 and below) that keeps ...
Resizing JTable Cells
by DevX Pro
How can I create cells in a JTable that span multiple rows/columns, as you can do in HTML with the rowspan/colspan tags?
Using the Swing Timer Class in an Application
by Ajit Sagar
< ...
Create Timer Threads Using the Swing Timer Class
by Ajit Sagar
The Swing package, which is now a standard API package in Java 2, offers a new timer utility. This utility is implicitly threaded and lets you create as many timer threads as required, while ...
Duplicates in a Swing ComboBox
by Tom Yarker
Swing's JComboBox can be used to present a drop-down list, perhaps of status reports from a process, requiring minimal screen space until the user wishes to see the details. But you run into a ...
Add a Hyperlink Listener in Java
by Rajasekaran Vinoth
To add a hyperlink listener in Java, add it to the JEditorPane and set its contents. A lot of errors may be thrown, but this is how the hyperlink listener must be added.
Event Thread and Painting
by Brett Spell
Java uses the event thread to notify listeners of events by making calls to methods such as actionPerformed() and itemStateChanged(). However, this same thread is also responsible for repainting ...
JFrame Exit Button
by DevX Pro
Is it possible to remove the close button from a JFrame or at least disable it?
21-40 of 63     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date