Java Reference
In-Depth Information
Swing Features
Most of the components and containers you learned about yesterday were Swing ver-
sions of classes that were part of the Abstract Windowing Toolkit, the original Java pack-
age for graphical user interface programming.
Swing offers many additional features that are completely new, including a definable
look and feel, keyboard mnemonics, ToolTips, and standard dialog boxes.
Setting the Look and Feel
One of the more unusual features in Swing is the ability to define the look and feel of
components—the way that the buttons, labels, and other elements of a graphical user
interface are rendered onscreen.
Management of look and feel is handled by UIManager , a user interface manager class in
the javax.swing package. The choices for look and feel vary depending on the Java
development environment you're using. The following are available with Java on a
Windows XP platform:
A Windows look and feel
n
A Windows Classic look and feel
n
A Motif X Window system look and feel
n
Swing's cross-platform Java look and feel, Metal
n
Figures 10.1, 10.2, and 10.3 show the same graphical user interface under several differ-
ent look and feel designs: Metal, Windows Classic, and Motif.
FIGURE 10.1
An application
using the Java
look and feel
(Metal).
 
Search WWH ::




Custom Search