Swing Packages and Classes
Here is a short description of each package in the Swing libraries:
-
javax.accessibility Contains classes and interfaces that can be used to allow assistive technologies to interact with Swing components. Assistive technologies cover a broad range of items, from audible text readers to screen magnification. Although the accessibility classes are technically not part of Swing, they are used extensively throughout the Swing components. We discuss the accessibility package in greater detail in Chapter 25.
-
javax.swing Contains the core Swing components, including most of the model interfaces and support classes.
-
javax.swing.border Contains the definitions for the abstract border class as well as eight predefined borders. Borders are not components; instead, they are special graphical elements that Swing treats as properties and places around components in place of their insets. If you wish to create your own border, you can subclass one of the existing borders in this package, or you can code a new one from scratch.
-
javax.swing.colorchooser Contains support for the
JColorChoosercomponent, discussed in Chapter 12.-
javax.swing.event Defines several new listeners and events that Swing components use to communicate asynchronous information between classes. To create your own events, you can subclass various events in this package or write your own event class.
-
javax.swing.filechooser Contains support for the
JFileChoosercomponent, discussed in Chapter 12.-
javax.swing.plaf ...