Swing GUI Toolkit Group

The Swing group is comprised of developers involved in the design, implementation, and maintanence of Swing GUI Toolkit.


Swing is a Graphical User Interface (GUI) API, offering a set of components that can be used to build rich desktop interfaces. This includes basic elements such as windows, buttons, scrollbars, etc., as well as more complex compound objects such as file choosers, color choosers and combo boxes.


Swing components are Java Beans, and are built around the Model-View-Controller (MVC) programming paradigm. This paradigm separates an application's business logic from its user interface so that they can be evolved independently.

JComponent is the core Controller class which coordinates Models and Views to display a final user component. All Swing components are inherited from JComponent. Note that components can have different views represented by different UIs.

The javax.swing.plaf package contains ComponentUI, which is the core class for the View and is a template for other components that inherit from it. ComponentUI is responsible for the ultimate painting of pixels on the screen.

A Model controls the data in components, from simple things such as the state of a check box, to the more complex rows and columns data structures used for a table. ComboBoxModel and TableModel are example model classes.

Source Structure

All of the core Swing source code resides in the java.desktop module, ie under java.desktop. So subsequent paths given below are relative to that base. For some exceptions to this see the end of this section. Most of the source is under the share/classes directory. Under this directory, source files are organized by their package hierarchy; for example, the source for javax.swing.JButton can be found in share/classes/javax/swing/JButton.java.

The javax.swing package contains several subpackages:

For historical reasons, some (traditionally) non-public implementation classes are in a package starting with "sun". The source for these classes can be found in share/classes/sun/swing.

Platform specific Look and Feels can be found in the share/classes/com/sun/java/swing/plaf directory. These are non-public implementation classes.

The GTK Look and Feel contains native code implementing gtk rendering with the gtk 2 and gtk 3 system libraries:

and also partly in:


There are two other modules besides java.desktop for which the Swing group is responsible

Building The Source

Swing's make files can be found in :