Sebastopol, CA--Java developers who moved from applets to full-scale applications in the mid-'90s exposed several weaknesses of the Java Developer Kit, one of which was the primitive functionality of GUI components in the Abstract Window Toolkit (AWT). To fix that particular problem, Sun Microsystems' Java group came up with Swing, a set of much more complete, flexible, and portable user interface components written entirely in Java. According to the authors of Java Swing (O'Reilly, US $54.95), Swing revolutionized user interface development, enabling enterprise development in Java. With the release of Java 2 SDK 1.4, Swing's performance is even better.
"The developers at Sun have put some hard work into speeding up all of the Swing components," notes Marc Loy, one of five authors who contributed to "Java Swing," now available in a new edition. "One place where Java has really become popular is in the development of intranet applications. Swing is still the easiest cross-platform environment with which to build the client-side. If you need cross platform GUIs, Swing is definitely the way to go."
Loy and his cohorts have completely revised their comprehensive book not only to cover features available in Java 2 SDK 1.3 and 1.4, but also to include extensive coverage of Java on the new Mac OS X environment. More than a reference, the new edition of "Java Swing" has hundreds of useful examples and detailed explanations to help programmers of all skill levels create code quickly and effectively. "I think our book is unique in its depth and breadth of coverage," Loy says. "We have every class in the Swing packages and try to show more complex examples than the average Swing book."
"Java Swing" offers a complete introduction to the entire Swing component set--tables, trees, sliders, spinners, progress bars, internal frames, text components, and more--with discussions on how to use them, display them on the screen, register for events, get information from them, extend them, and even create new ones. The book also goes into detail about the model-delegate architecture behind the components and discusses the data models. As the book explains, "Understanding the models is essential when you're working on an application that requires something significantly different from the component's default behavior."
The new edition also examines an exciting aspect of Swing known as "Pluggable Look-and-Feel." With this feature, developers can choose among several pre-built L&Fs, including Windows, Unix Motif (common in Windows 3.1), Java Metal, and the stunning new Mac OS X L&F based on Apple's Aqua user interface. Or, they can change the L&F of each individual component, something that game developers might appreciate.
While the Swing API is the primary focus of the book, "Java Swing" now has chapters on other libraries in the Java Foundation Classes. That includes Java's Drag and Drop package and the Accessibility features for assisting users who have trouble with traditional user interfaces. The book also explores layout managers, such as the SpringLayout Class, and formatted text fields.
"Reasonably experienced Java programmers who need to develop graphical applications will appreciate this new edition," Loy comments. "And experienced graphical user interface programmers will find several new topics and nuances to explore. Programmers new to the GUI world will find a wealth of examples on the broad range of graphical components in the Swing packages. Developers should have a book that covers the vast topics related to Swing application design and our book tackles that need."
Chapter 14, Menus and Toolbars is available free online
More Java info: ONJava.com
Java Swing, 2nd Edition
By Marc Loy, Robert Eckstein, David Wood, James Elliott, Brian Cole
0-596-00408-7, Order Number: 4087
1278 pages, $54.95 US, $85.95 CA, 38.95 UK
O'Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O'Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying "faint signals" from the alpha geeks who are creating the future. An active participant in the technology community, the company has a long history of advocacy, meme-making, and evangelism.
PRESS QUERIES ONLY