Contents |
This lesson contains a collection of how-to pages to help you use miscellaneous Swing features.How to Use Actions
WithAction
objects, you can coordinate the state and event handling of two or more components that generate action events. For example, you can use a singleAction
to create and coordinate a tool-bar button and a menu item that perform the same function.How to Support Assistive Technologies
Swing components have built-in support for assistive technologies. Your program can provide even better support by following a few rules.How to Use Borders
Borders are very handy for drawing lines, titles, and empty space around the edges of components.. (You might have noticed that the examples in this trail use a lot of borders.) This section tells you how to add a border to anyJComponent
.How to Use Icons
Many Swing components can display icons. Generally, icons are implemented as instances of theImageIcon
class.How to Set the Look and Feel
You have the option of specifying the look and feel of your Swing components.How to Use Threads
Read this section if you need access to the GUI from any thread except the event-dispatching thread. This section explains how to use methods such asinvokeLater
, and classes such asSwingWorker
. It also tells you when you might want to use theTimer
class.How to Use Timers
With theTimer
class, you can implement a thread that performs an action after a delay, and optionally continues to repeat the action.
Using Other Swing Features |