Java: A platform for platforms
Sun's reorg may seem promising to shareholders but it's also a scramble for position. The question now is whether Sun can, or wants to, maintain its hold on Java technology. Especially with enterprise leaders like SpringSource and RedHat investing heavily in Java's future as a platform for platforms

Also see:

Discuss: Java: A platform for platforms?

Featured Whitepapers
Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Get ready to Swing (1.0)

The Java look and feel goes Organic -- and it adds a new default, cross-platform look

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 4

Swing 1.0 gets a new look (actually, two!)

JavaSoft is planning two additional L&Fs for Swing 1.0. The Symantec Visual Café development team and Apple engineers helped JavaSoft design the Macintosh L&F. And the JavaSoft design team has crafted a new default, cross-platform L&F (known as the Metal L&F).

The Macintosh L&F

The Metal (default) L&F



Metal was created as a compromise between the burden of overamped 3D design and the need for some sort of 3D effect to provide visual cues. Many users complained about the "bumpiness" of 3D bevels, especially on buttons in toolbars. So the designers went for an "etched" or "flush" 3D look, eliminating some of the visual clutter while still providing visual clues as to the state of the element.

The traditional, 3D bevel look (top) versus the new Metal L&F "etched" look

Also, since Metal is the new default L&F in Swing 1.0, it was designed with a simpler color model than the pre-release default, so it won't develop color-mapping problems from platform to platform. (For more on the Metal design, see "Metal design highlights" in Resources.)

According to JavaSoft officials, the Macintosh L&F won't be available when Swing 1.0 makes its debut later this month, but it should follow soon after. Also, because Metal is the new default cross-platform L&F, the Organic L&F (Vancouver and Santa Fe) will be available for downloading, but won't be bundled in Swing 1.0.

Swing's place in the JFC

Swing components support the JavaBeans event model, which means they can work "out of the box" in applications and IDEs that support beans. In JDK 1.1 (and forward), Swing is one of the five APIs that make up the Java Foundation Classes (JFC). The others are:

  • The Abstract Windowing Toolkit (AWT) -- A GUI-development toolset that serves as a foundation for many Swing classes.

  • Java 2D -- A set of classes for advanced 2D graphics and imaging; the API is based on technology from IBM/Taligent.

  • The Accessibility API -- An assistive technologies interface, designed to help people with disabilities interact with JFC and AWT components through such features as screen magnifiers and audio text readers.

  • Drag and Drop -- Based on the JavaBeans "Glasgow" specification, this technology allows data to be shared between Java and native applications, between different Java applications, and within a single Java application.


Swing component classes

Swing is implemented by three elements of the JFC:

  • UI classes -- A set of components that descended from JComponent (which descended from AWT's Container class). The hierarchy lets Swing components contain other components, which allows developers to nest components.

  • Non-UI classes (1) -- Swing-related support classes that don't create visible onscreen Swing components, but provide services to the Swing API.

  • Non-UI classes (2) -- A set of Swing-related interfaces that are implemented by Swing's component classes and support classes.


The UI classes are responsible for the pluggable L&F, component extensibility, keyboard-stroke trapping, component border customization, tool tip support (short descriptions of components), auto-scrolling, and debugging and localization support.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
  • What is Swing? http://java.sun.com/products/jfc/swingdoc-current/intro.html
  • The Swing toolset http://java.sun.com/products/jfc/swingdoc-current/tool_set.html
  • The Swing Connection online newsletter http://java.sun.com/products/jfc/swingdoc-current/
  • Metal design highlights http://java.sun.com/products/jfc/swingdoc-current/chris_ryan/metal.html
  • Regular JavaWorld columnist, Todd Sundsted, demonstrates the power of Swing's lightweight components in "Put your user interface on a diet" (JavaWorld, March 1997) http://www.javaworld.com/javaworld/jw-03-1998/jw-03-howto.html