Java Reference
In-Depth Information
CHAPTER 1
■ ■ ■
Swing Overview
A ccording to Encyclopedia Britannica , Swing was a popular music in the United States, circa
1930-1945. Okay, maybe not in the Java sense. Instead, on May 23, 1995, John Gage, then director
of the Science Office for Sun, introduced Java to the world. With its birth came something called
the Abstract Window Toolkit, or AWT. In turn, with AWT came native widgets, and with this
early native widget set came . . . trouble.
The original component set that came with the Java platform, AWT, was dependent on too
many idiosyncrasies of the underlying platform. Instead of providing a mature-looking compo-
nent set, Java offered the lowest common denominator version. If a feature wasn't available on
all Java platforms, it wasn't available on any Java platform. And then you had to deal with all the
browser/platform differences. Each Java runtime environment relied on how the component
set was connected with the underlying platform-specific native widget set. If there were issues
with the connection, first, they were specific to the platform (and/or browser) and second, you
had to code around these problems so your programs could be write-once, run anywhere
(WORA), the Java mantra of the time.
As Java technologies became more popular, users realized AWT was extremely slow and
unreliable, and you couldn't really do much with the provided components. Very few of them
were available, and you couldn't use them in a visual programming environment. So, new
technologies were introduced, such as just-in-time (JIT) compilers to improve performance
and, with Borland's help, JavaBeans for a component-based development.
With these new technologies came more and more widget sets, for the AWT component
set itself was very basic. So, applet download times grew and grew, because these new widget
sets weren't part of the core Java platform, and Java archive (JAR) files were introduced to
improve delivery time. Eventually, each of the major browser vendors added its favorite
component library to its virtual machine—AFC, IFC, and WFC, to name just a few. Yet all the
libraries used different design models, and there were no true cross-browser standards.
Eventually, Sun Microsystems teamed up with Netscape Communication and other partners
to create yet another library called the Java Foundation Classes, or JFC. Part of JFC is something
called the Swing component set. This Swing component set is what this topic is all about.
1
Search WWH ::




Custom Search