To answer the second post first, the book has snippets from about 150 examples. Our books used to have a code appendix with the complete code printed, but when we surveyed our readers, a majority indicated that they'd
rather have a smaller book than one with complete listings.
All the examples exist in complete, runnable form on the CD that comes with the book and on the web. All but a few of the examples can be run using Java Web Start over the web.
The CD also has the 1.4.2 version of the J2SE and the API doc, and a PDF copy of The Swing Connection. All this stuff is available in one form or other at java.sun.com. The book is basically a cleaned up version of http://java.sun.com/docs/books/tutorial/uiswing/
, optimized for printing and with a TOC, bleeding tabs, index, CD, and everything else we could do to make it convenient to use in book form. You can look at the book contents
or the Swing trail contents
(which have links to pages) to get a better idea. (Note that the book ordering is different, but the information contained is the same, except for the level of polish.)
In general, the book (like the website it's taken from) gives definitive instructions for performing common tasks. It doesn't go into great depth on most topics, but it covers a wide range of topics and has examples for everything.
It also provides some handy code to reuse -- for example, it includes a table column sorter, drag-and-drop recipes, and a password entry panel.
Many people (including me) don't like to read/print reams of information from the web, or like to be able to read stuff while they're away from the computer. They're the people we expect to buy the book.
The book is for both beginners and experienced engineers. The engineers in the Swing, 2D, i18n, and AWT groups have been grabbing copies, for example, and they ain't beginners. It's just handy to have the book around when you're trying to do something you haven't done in a while, or when you're wondering what the "right" way is to do something. As my co-author Sharon mentioned in another post, the engineers reviewed the book, so you know you're getting the straight poop. (Though she used an unscatological yet JavaRanch-appropriate horsy metaphor.)
[ April 27, 2004: Message edited by: Kathy Walrath ]