The GUI Libraries
package contains the older (Java 1.1) GUI component and support classes. Java GUI application development as of Java 1.2 has largely moved to the more powerful and versatile Swing classes; however, some Swing
package defines event classes and listeners. When a
package contains the Swing GUI component and support classes. Swing components are much more powerful and versatile than their AWT counterparts. For one thing, the Swing GUI containers have different panes or
package has a greatly expanded set of GUI components from which to choose. In the
package there is only one class that represents a button and many of the style features, such as the component border, are hard-coded into the class. The
package defines many kinds of
With Swing, you can be creative when it comes to assigning borders to your GUI components. The javax.swing.border class provides classes to generate raised, line, matte, etched, empty, titled, or compound borders.
Swing GUI components are more diverse, versatile, and powerful than their AWT counterparts. It is only natural that they would need additional event classes to support their enhanced functionality. Among other things, the
package defines events and event listeners for
One of the powerful Swing components is the JTable class, defined in the javax.swing package, which allows you to represent data in a table-like format. The javax.swing.table package provides support classes and interfaces for JTable objects. Included are classes and interfaces to define the table and table column models, the table cell renderer, and the table cell editor.
The javax.swing.text package provides classes and interfaces for working with editable and noneditable text components. Included is the Document interface that defines the document model for Swing text components. The classes defined in this package include the editor kit, view, highlighter, and document filter classes.
Another powerful Swing component is the JTree class that allows you to represent data in a tree-like structure. The javax.swing.tree package contains interfaces and classes that define the nodes, model, selection model, cell editor, and cell renderer of a JTree .