Building a GUI: Components, Containers, and Layout Managers

Chapter 14 introduced you to the two-phase GUI building approach. Although this approach was used with the AWT's windowing toolkit, it can also be used with Swing's windowing toolkit. As you learned, the first phase constructs a GUI's look, and is achieved by working with components, containers, and layout managers.

Exploring Components

Swing provides the JComponent class (located in the javax.swing package) as the superclass for all its lightweight component and container classes. This class offers the following services:

  • PLAF support

  • Accessibility support

  • ToolTip support

  • Improved keystroke handling

  • Double-buffered painting structure that supports borders

  • Component-specific property support ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.