|
HAVE YOU EVER TAKEN LOOK AT the Swing libraries and been SO overwhelmed at
where ta start that you simply gave up? It isn't an uncommon feeling: Just by
themselves, the Swing libraries are much larger than the entire Java 1.0 platform.
According ta the The ]ava Developers Almanac 1999 (Addison-Wesley), what
started out as a collection of 212 classes with 2,125 member fields and methods
in 8 packages for ali of Java 1.0 is now 752 classes with 9,589 members in 16
packages for the Swing libraries alone- and that doesn't include the
corn. sun. java. swing packages!
An earlier book of mine, Java AWT Reference (O'Reilly), an the older and now
obsolete AWT package (at least as far as the components that are used for graphical
user interface development go), consisted oftwo parts: a tutorial-like section
in the front and an API reference in the back. By and large, it was the same material
presented in two different ways describing the fi ve java. awt packages.
In this book, 1 provide the same level of coverage for the Java Swing libraries,
but I stick with a mostly how-to, tutorial-like treatment. If ali you want is a reference
book an API, this probably isn't the one for you. However, if you are hoping
to learn how ta use the essential parts of Swing, you've carne to the right place.
Although I believe the AWT component set is obsolete for graphical user
interface development, Swing does use the AWT structural parts, such as the
delegation-based event model and layout managers. In the following chapters,
you'll find a general review ofthe delegation-based event model and an explanation
of the new layout managers provided with the Swing components.
I won't describe the process of installing the JDK, compiling a Java program,
or running a program. Those tap ies are covered in other Java books, including
o ne of my own, Mastering ]ava 2 (Sybex). Besides, I as sume that you're capable
of setting up your own development environment.
So, is this book for you? If you are brand new ta Java, you should probably
get the basics down first before jumping onto the Swing bandwagon. On the
other hand, ifyou've been developing with Java for a while and have decided
that it's a good time ta start using the Swing component set ar the Java 2 platform
instead of the AWT, you'll find this book extremely useful. With this book,
you won't have ta drudge through the countless Swing classes for a way ta
accomplish a task that was impossible with AWT, and you'll find out how ta
become more productive and make the most of the many reusable components
and techniques in Swing. |