Java Reference
In-Depth Information
making Java one of the first languages to support the Unicode standard for Internationaliza-
tion. Supporting this was the new package
java.text
and some code in
java.util
, build-
ing upon the
Readers
and
Writers
to provide broader support for internationalization; this
change introduced
Calendar
and
GregorianCalendar
,
Format
(
DateFormat
,
Mes-
sageFormat
,
NumberFormat
), and the
Locale
and
ResourceBundle
classes.
In the GUI toolkit AWT, the event model was changed from a single method to handle all
events, to the now-universal event listener model used on all GUI toolkits invented since. To
help support event listeners, inner classes were added to the language, which would remain
the preferred way of implementing listeners up until Java 8. Two other significant additions
in 1.1 were the JavaBeans conventions and packaging, and the
JDBC Database Access
in
package
java.sql
, which was to become one of the cornerstones of Java Enterprise Edition
(Java EE).
What Was New in Java 2 (Java SDK 1.2)
Java 1.2 was one of the two largest revisions—including Collections, Swing, and Reflec-
tion—to the Java Platform. So large was this revision that the marketing of this release intro-
duced the term “Java 2” for the Java Platform, which was to stick around until the next of the
largest releases, Java 5 and its implementation JDK 1.5. This “Java 2” name is the basis of
the now long-defunct names “J2SE” and “J2EE” for the Standard and Enterprise platform
editions, respectively. The Java 2 release featured the
Collections framework
, a unified sys-
tem for data structuring, introducing the basic Collections structure described in
The Collec-
Hashtable
to conform to the new interfaces).
It had become obvious that AWT was inadequate for advanced desktop GUI development,
because it had been (deliberately) chosen to provide a “least common denominator” ap-
proach to GUIs on all the platforms common at the time, including Mac OS 7, OS/2, Win-
dows 95 and Unix—if any of these platforms didn't support a feature, it was omitted. And
worse—if different platforms worked differently or had bugs in a given feature, Java inher-
ited those differences and bugs, because AWT always used the native platform components
directly. Swing provided a clean break from this tradition, doing all the rendering in
Java—providing consistency and full-featuredness on all platforms—and providing plug-
gable “look and feel” implementations to make the GUI components “look right” on each
platform.