Swing Components

Here, we describe a number of components available in the javax.swing.JComponent class. Figure 8.3 shows the inheritance hierarchy for both top-level containers and many of the lower-level components.

All the components within the JComponent class begin with a J. This distinguishes them from the earlier AWT components.

To abbreviate Swing class names, a program should include the statement

import javax.swing.*;

Some of the Swing Components are;
  • Button
  • Combo Box
  • Combo Box Button
  • Radio Button
  • Text Field
  • Text Area
  • Label
  • List


Figure 8.3: Swing component inheritance hierarchy

No comments:

Post a Comment