O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required