TheWebGuru.Com Logo

Swing
What is JavaSwing?
The Swing API provides a comprehensive set of Graphical User Interface components and services which enables the development of commercial-quality desktop and Internet/Intranet applications. Swing is built on top of many of the other Desktop Java technologies including JavaBeans, AWT, Java2D, Accessibility, and Internationalization.

Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit. 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 is a highly partitioned 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. In general, Swing users can extend the framework by extending existing (framework) classes and/or providing alternative implementations of core components.

Fine control over the details of rendering of a component is possible in Swing. The visual representation of a Swing component is a composition of a standard set of elements such as a border, inset, decorations, etc. Users can programmatically customize a standard Swing component by assigning specific Borders, Colors, Backgrounds, opacities, etc., as the properties of that component.

Swing's heavy reliance on runtime mechanisms and indirect composition patterns allows it to respond at runtime to fundamental changes in its settings. For example, a Swing-based application can change its look and feel at runtime. Further, users can provide their own look and feel implementation, which allows for uniform changes in the look and feel of existing Swing applications without any programmatic change to the application code.

The Swing library makes heavy use of the Model/View/Controller software design pattern, which conceptually decouples the data being viewed from the user interface controls through which it is viewed. So most Swing components have associated models and the programmer can use various default implementations or provide their own. The framework provides default implementations of model interfaces for all of its concrete components.
More ...
Related Articles: