Make your own free website on Tripod.com

Java Swing

Based on an article from "Software Development Magazine"

Released in June 1998 as a solution to the problems of AWT. Include new components and more solid foundations.

Based on the Model-View-Controller concept.

Swing is part of the Java Foundation Classes (JFC) technology.

Swing allows replacing data model with another that is custom-designed for an application.

It also enables the redesign of the UI for individual components (can accommodate speech or Braille).

Each Swing component is completely independent, but can communicate with the other components by transferring messages.

The Swing components manage their own painting within the view (no need for interface to native components like the AWT peer mechanism).

Swing is 100% pure Java and looks the same for every JVM (Java Virtual Machine).

The Swing class structure is similar to AWT (which makes the migration process easier) the APIs also bear resemblance.

All the classes inherit from Jcomponent which extends the AWT container class - meaning - every component can contain another component (for example: enter a check box component into a list box component to create a list of check boxes).

Most third party companies are in the process of upgrading their components from AWT to Swing. Some collisions are expected.

 Swing components are considers Lightweight - demanding fewer resources and creating faster code.
The peer-based AWT components are considered Heavyweight components. There is no backward compatibility between the two technologies and incorporating components from both technologies in one system can prove to be difficult and unsatisfactory.

Swing can use transparent pixels in order to overlay several components to create a much more sophisticated UI.

Swing components do not relay on a native peer interface, so we can alter the look and feel and meet specific demands of the UI.

Z-Order - The layers on which certain components are drawn.

Lightweight components will use the Z-Order of their nearest Heavyweight component. Heavyweight components receive their own unique Z-Order position and can conflict with any Lightweight component that is drawn on the same panel.

'Metal' look and feel - official cross platform Java look and feel, would render the same look and feel for the application across all operating systems.

Reference:

The Swing Connection

Software Development Online

 

This document was last updated on: Tuesday, October 06, 1998

---

Email Me Your Comments

Back to Alon's Home Page


Nedstat Counter