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.
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:
Improved keystroke handling
Double-buffered painting structure that supports borders
Component-specific property support ...