SWING OVERVIEW

 

 

 

 

 

·        The classes that create the GUI components above are part of the SWING API which is contained in the package javax.swing. Most swing components are manipulated and diplayed entirely in Java so they are purely Java components as opposed to AWT components which rely on the system that they are running on.

 

 

 

·        Swing components are considered lightweight components because they are not tied to the operating system on which they are running as opposed to AWT components which are considered heavyweight components.

 

 

 

·        Much of each GUI components’s functionality is derived from the classes

java.lang.Object

 

 


java.awt.Component

 

 

java.awt.Container

 

 

            javax.swing.Jcomponent

 

 

 

 

 

 

Swing components  of the subclass JComponent have many features including:

 

1.      A pluggable look and feel  than can be used  to customize the look and feel when the program executes on different platforms.

2.      Shortcut keys for direct access to GUI components through the keyboard

3.      Common event-handling capabilities for cases where several GUI components initiate the same actions in a program.

4.      Brief descriptions of a GUI component’s purpose(TOOL TIPS) that are displayed when the mouse cursor is positioned over the component for a short time.

5.      Support for assistive technologies such as Braille screen readers for blind people

6.      Support for user interface localization

 

 

 

 

Example

 

Bug Image