Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JFC: An in-depth look at Sun's successor to AWT

Swing into great UI development

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
The Java Foundation Classes (JFC) is the new set of user-interface classes Sun is creating to address developer dissatisfaction with the AWT (Abstract Windowing Toolkit). JFC is included in the JDK version 1.2. (See Resources for Sun's Java release schedule.)

The facts about JFC

With the Java Development Kit release 1.1, Sun engineers made sweeping improvements to most parts of the Java platform and added capabilities crucial to the development of large-scale, distributed applications, most notably database development with JDBC, component architecture with JavaBeans, and distributed objects with RMI. In contrast, the JDK 1.2 has just one key theme, but it is of such central concern to Java developers that JDK 1.2 may prove to be as significant as the earlier release. The theme of JDK 1.2 is user interface (UI), and it is implemented with the Java Foundation Classes (JFC).

Preliminary versions of the largest part of JFC have been available as a separate download under the code name "Swing" for several months. Java developer Rick Frost of PeopleSoft has been experimenting with Swing and says it changed radically from version 0.3 to 0.4 to 0.5. In the documentation for version 0.5, Sun stated that "in general, all of the API in the swing, border, event, table, target, text, tree, and undo packages are frozen." Impressed with this version, Frost says, "it looks really solid now that the API has stabilized in 0.5." Currently, version 0.6.1, which contains the surprise announcement of a Java look and feel, is available for download from Sun's Java site, and the final shipping version of JFC 1.1 (which works with JDK 1.1 software) will be posted for free download in January 1998. It will be included in JDK version 1.2, which is scheduled for its first beta release this month -- December 1997; the final version of JDK 1.2 is slated to ship in the second quarter of 1998.

At his visionary keynote at the September 1997 SIGS Conference for Java Development in Chicago, "Emergence of a Java Reality," Sun Java Evangelist and JavaWorld columnist Miko Matsumura treated his enthusiastic audience to a demo of "Swing," the major component of the JFC. JFC also was the subject of two of the conference's 60 technical sessions, and another session compared JFC with Microsoft's Application Foundation Classes (AFC).

SIGS conference attendees had two questions about JFC:

  1. Does it replace the AWT?
  2. What's the big deal about another set of user-interface classes?


Miko had this to say about JFC:

In order to appropriately contextualize the Java Foundation Classes (JFC), we need to understand what problems it addresses. The original method for providing GUI functions in Java was the Abstract Windowing Toolkit (AWT), which relied on native peers (Mac system buttons on a Mac, Motif buttons on Solaris, and so on) in order to achieve consistent functionality across systems. In many cases, devices such as telephones don't have a lot of screen real estate to waste, so this peer methodology allows the mapping of telephone buttons to AWT "buttons" as needed. Thus, AWT solves a difficult and necessary problem for functioning across a variety of hardware platforms. What it does not do is achieve consistent appearance, since it is dependent on the host for its look and feel.

This [peer methodology] raised two issues: 1) The task was more difficult to implement than was originally thought, which resulted in bugs; and 2) Many people want more than consistent functionality -- they want consistent appearance. The JDK 1.2 AWT should solve a lot of the bug issues, but in order to solve the problem of consistent appearance across platforms, another solution is needed.

  • 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