Inside a Java Mobile Application, Part 1 by Johan Vos Java EE—the Most Lightweight Enterprise Framework? It is part of Oracle's Java Foundation Classes (JFC) – an API for providing a graphical user interface (GUI) for Java programs.For example, a Swing-based application is capable of hot swapping its user-interface during runtime.
Thus, a Swing component does not have a corresponding native OS GUI component, and is free to render itself in any way that is possible with the underlying graphics GUIs.
However, at its core, every Swing component relies on an AWT container, since (Swing's) extends (AWT's) Container.
Complete documentation for all Swing classes can be found in the Java API Guide for Version 6 or the Java Platform Standard Edition 8 API Specification for Version 8.
Swing is a highly modular-based architecture, which allows for the "plugging" of various custom implementations of specified framework interfaces: Users can provide their own custom implementation(s) of these components to override the default implementations using Java's inheritance mechanism. Swing objects asynchronously fire events, have bound properties, and respond to a documented set of methods specific to the component.
Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit (AWT).
Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform.
Swing's high level of flexibility is reflected in its inherent ability to override the native host operating system (OS)'s GUI controls for displaying itself.
Swing "paints" its controls using the Java 2D APIs, rather than calling a native user interface toolkit.
Additionally, this framework provides a layer of abstraction between the code structure and graphic presentation of a Swing-based GUI.
Swing is platform-independent because it is completely written in Java.
The introduction of support for a pluggable look and feel allows Swing components to emulate the appearance of native components while still retaining the benefits of platform independence.