by Jenni Aloi

Swing’s house-hunting days may be over

news
Sep 1, 19984 mins

Sun to change packaging strategy for Swing, seeks feedback on proposal

August 25, 1998 — Swing, Sun’s new GUI toolkit, has created quite a stir lately among developers — not because of its improvements over AWT, but because of the ever-changing status of where the library resides. The Java community has indicated that because Swing is considered part of core Java, where it lives is quite important.

Moving target

Swing has been somewhat nomadic since its debut earlier this year. It originally was slated to ship with JDK 1.2 in java.awt.swing; however, when JDK 1.2 fell behind schedule, Sun decided to release the library with JDK 1.1 rather than delay Swing’s release. This first release was placed in com.sun.java.swing because JDK 1.1-compatible browsers could not download classes from the java.* (core Java) package hierarchy (due to security issues). Developers understood this placement to be temporary.

In the third beta version of JDK 1.2, Swing was indeed moved to the java.awt.swing package to take its rightful position as part of core Java. Early adopters of Swing, those who had developed applications using the original package, were none too pleased, and they let Sun know it. “The feedback we received is that two package names is difficult to support. We have to consider the needs of developers of existing projects,” noted Onno Kluyt, senior product manager for JFC, so we felt we had to make an exception and place Swing outside the java.* namespace.”

So back into com.sun.java.swing it went. For all intents and purposes, Swing had found its home.

Well, not quite.

When Sun announced that it would permanently house Swing in com.sun.java.swing for both the external JDK 1.1-based package and the core package for JDK 1.2, developers went ballistic. In a JavaWorld poll, posted on August 3, a full three-quarters of the more than 2,500 respondents expressed dismay with Sun’s decision (see Resources for the poll results), noting that core libraries should reside in the java.* hierarchy.

Latest housing plans

Sun decided yet again to rethink its position, and here’s what it came up with:

The decision to use the com.sun.java.swing package name for JDK 1.2 has resulted in immense confusion in the developer world. It seems that many developers believe this naming compromises Swing’s “core” status, as well as Sun’s commitment to further the technology. This concern has been discussed widely on the news groups and Swing discussion aliases, and finally culminated into a

JavaWorld

poll.

We’ve been listening intently to this feedback and have developed this proposal to name both packages javax.swing [The “javax” prefix indicates that Swing was initially developed as an “extension” (for JDK 1.1) and has migrated into the core runtime for JDK 1.2.] in order to address the negative concerns over the com.sun.java.swing name. We believe this solution balances the needs of both camps of developers.

So, are Swing’s house-hunting days over? It appears so, but the Swing team at Sun is eager to get your feedback on its proposal. Don’t dally! You have only until August 28 (see Resources).

Developer reaction

JavaWorld asked several developers what they thought of Sun’s latest proposal.

“I firmly support the new proposal,” said Rick Ross, president of the Java Lobby. “I think it is an outstanding decision, and I’m very glad to see that Sun is able and willing to be responsive to the needs and concerns of Java developers.” Ross said the move is “good for Swing, good for Java, and good for Java developers” and encourages “everyone to support this proposal.”

Other developers, while happy that Swing has moved out of com.sun.java.swing, voiced concern that the concept of “core Java” is still unclear: “This isn’t the best solution. They [Sun] are still muddying the waters about what the core packages mean,” said Scott Ganyo, a software engineer at Interactive Intelligence Inc. “Just looking at JDK 1.2, they have added org.omg.* and now javax.* packages and are calling them ‘core.'”

Ross agreed that “there is need for further clarification about exactly what ‘core’ means.”

Kluyt said he understands these concerns and indicated that future Java documentation will be very specific about what is and what is not core Java. In addition, Kluyt stressed that “Swing is core to JDK 1.2, and Sun is committed as ever to Swing and JFC.”