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.
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.
TableModel are example
Most of the Swing source code resides under the
src/share/classes directory of the workspace. Under
this directory, source files are organized by their package
hierarchy; for example, the source for
javax.swing.JButton can be found in
javax.swing package contains several
javax.swing.border- specialized borders for Swing components
javax.swing.colorchooser- classes and interfaces for
javax.swing.doc-files- ancillary javadoc files for Swing
javax.swing.event- Swing specific events
javax.swing.filechooser- classes and interfaces for
javax.swing.plaf- UI base classes and implementations for platform independent Look and Feels
javax.swing.table- classes and interfaces for
javax.swing.text- classes and interfaces for editable and non-editable text components
javax.swing.tree- classes and interfaces for
javax.swing.undo- provides support for undo/redo operations
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
Platform specific Look and Feels can be found in the
These are non-public implementation classes.
The GKT Look and Feel contains native code implementing gtk rendering with the gtk+-2.0 system library:
and also partly in:
solaris directory includes the source for Linux
because of their similarity to Solaris OS code. In fact Swing
sources that lie under
solaris directory are the same
for Linux and Solaris.
Building The Source
Swing's make files can be found in the following directories:
make/javax/swing- builds most Swing API classes
make/sun/xawt- builds the native part of the GTK Look and Feel
You can find information on how to build Swing using NetBeans here:
- JSR 295 - Beans Binding: This JSR will provide an API that allows two properties of two beans to stay in sync.
- JSR 296 - Swing Application Framework: This JSR will provide a simple application framework for Swing applications. It will define infrastructure common to most desktop applications. In so doing, Swing applications will be easier to create.
- SwingLabs: SwingLabs is an open source laboratory for Swing. It is an umbrella project for various open source initiatives which seek to make Swing programs faster, easier to write and more visually appealing. Successful code and concepts may be migrated to future versions of the Java(tm) platform.
- Mailing lists