Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Swing

Posted by Hemos on Tue Apr 11, 2000 08:58 AM
from the more-swinging-with-java dept.
Jayakrishnan has returned with another review of a Java book. This time around it's Matthew Robinson and Pavel Vorobiev's Swing. Published by Manning Publications, this book is designed to give information to both beginners and advanced programmers.
Swing
author Matthew Robinson and Pavel Vorobiev
pages 917
publisher Manning Publications, 08/1999
rating 10/10
reviewer Jayakrishnan (JK)
ISBN 1884777848
summary Unique examples and the exhaustive coverage of Swing make this a valuable book for both beginners and advanced programmers.
*

How many times have you opened a book in search of a solution and found not only an answer, but also an elegant enhancement to your application? How many times have you ignored an O'Reilly book on the same subject lying on your table? The answer is Manning's new book Swing authored by Mathew Robinson and Pavel Vorobiev. And that is my final answer.

The book (with just a 5-character title) is 917 pages long and is divided into four parts containing 23 chapters, an appendix and a bibliography. The first part, "Foundations," introduces Swing, its architecture and the key mechanism underlying Swing. Part II, mysteriously called "The Basics," explains the most commonly used and simpler classes of the Swing toolkit like labels, buttons, menus, list boxes, progress bars and sliders. The third part of the book, "Advanced topics," deals with using complicated components like trees, tables, text components and layered panes, as well as creating pluggable look and feel. The final part, "Special topics" introduces printing and the Java2D API.

Only two chapters of the final part are included in the book. The remaining four chapters which discuss accessibility, JavaHelp API, CORBA and some examples contributed by experienced Swing developers are available on the book's Web site.

The structure of each chapter is the same. Let's look at the chapter on tables as an example. The JTable class is introduced followed by related classes and interfaces. This is followed by discussions on row and column selections from JTable, column width and resizing and customizing the appearance of the table. The important methods related to these issues are discussed and short code samples are used to demonstrate the main features.

Then comes the meat of the chapter -- the examples. The first example shows how to display stock market data in a JTable. Complete code for the example is given and important sections are discussed. The examples that follow are enhancements to the first example. In the JTable chapter, they include adding custom renderers, customizing the data rendering, retrieving and displaying data from a database.

Each of the examples builds upon the previous one and as promised on the cover of the book, is production-quality code. While most other Swing books serve as expensive javadoc dumps of JFC with trivial, forgettable examples, Swing provides code that saves lots of time for the developer. The other applications that are developed in the book include a JPEG image editor, an ftp client, an X-Window-style desktop environment and a word processor.

This book is for the developer building applications using the Swing components of the Java Foundation Classes. The large number of examples make this a great cookbook providing code samples that will vastly reduce your development time. The language is simple and the examples are well defined. All the Swing components are discussed in detail with several screen shots.

The part I liked the most in this book is the section in each chapter about extending the Swing components to create custom components. These include creating an oval shaped border, polygonal buttons, and a tabbed pane which takes an image as the background. These examples provide knowledge to extend the components in ways limited only by your imagination.

The book is sprinkled with UI design guidelines by David Anderson related to usability and presentation. There is no reference to the Java Look and Feel Design Guidelines issued by JavaSoft. So I would recommend referring to that book (published by Sun Microsystems) if you want to design applications with consistent appearance and behavior.

The only minor annoyances in this book are the figures which display the component hierarchy, as they have an unprofessional look. But there are only a few of them.

To summarize, the unique examples and the exhaustive coverage of Swing makes this book very valuable for both beginners and advanced programmers.

Purchase this book at ThinkGeek.

This discussion has been archived. No new comments can be posted.
Swing | Log In/Create an Account | Top | 107 comments (Spill at 50!) | Index Only | Search Discussion
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2
(1) | 2