Richard's J2SE Day 10 Building a Swing Interface
(P261)
Swing offers the following features
- Components = buttons, text fields, text areas, labels, check boxes, radio buttons, scrollbars, lists, menu items and sliders
- Containers - hold other components (including containers) = frames, panels, windows, menus, menu bars, and tabbed panes
(P262)
(P262)
UIManager = a class in the javax.swing package
- Windows look and feel
- Motif X Window system look and feel
- Swing's cross-platform Java look and feel, called Metal
setLookAndFeel(LookAndFeel) method choose a program's look and feel. (throws UnsupportedLookAndFeelException if it cannot set the look and feel)
to get a LookAndFeel object:
- getCrossPlatformLookAndFeelClassName() = returns a LookAndFeel object representing Metal look and feel
- getSystemLookAndFeelClassName() = returns a LookAndFeel object representing your system's look and feel
Under most circumstances you should call setLookAndFeel() only after every component has been added to your GUI, before you make interface visible.
(P265)