The Swing classes eliminate Java's biggest weakness: its relatively primitive user interface toolkit. Swing provides many new components and containers that allow you to build sophisticated user interfaces, far beyond what was possible with AWT. The old components have been greatly improved, and there are many new components, like trees, tables, and even text editors. It also adds several completely new features to Java's user interface capabilities: drag-and-drop, undo, and the ability to develop your own "look and feel," or the ability to choose between several standard looks. The Swing components are all "lightweight," and therefore provide more uniform behavior across platforms, making it easier to test your software.All these new features mean that there's a lot to learn. Swing is undoubtedly way ahead of AWT -- or, for that matter, any widely available user interface toolkit -- but it's also a lot more complicated. It's still easy to do simple things. But once you've seen what's possible, you won't want to do the simple things.Java Swing gives you in-depth coverage of everything you need to know to take full advantage of Swing, providing detailed descriptions of every class and interface in the key Swing packages. It shows you how to use all of the new components, allowing you to build state-of-the-art user interfaces. It also discusses how the components implement the MVC (Model View Controller) architecture, so you can understand how the components are designed and subclass them intelligently. Finally, it shows how to create your own "look and feel." Throughout, Java Swing focuses on giving you the context you need to understand what you're doing. It's more than documentation; Java Swing helps you develop code quickly and effectively.Whether you're a serious Java developer, or just trying to find out what Java can do, you'll find Java Swing an indispensable guide.

Appendix Look & Feel Resources

Colophon

Robert Eckstein

Robert Eckstein, an editor at O'Reilly, works mostly on Java books (notably Java Swing) and is also responsible for the XML Pocket Reference and Webmaster in a Nutshell, 2nd Edition. In his spare time he has been known to provide online coverage for popular conferences. He also writes articles for JavaWorld magazine. Robert holds bachelor's degrees in computer science and communications from Trinity University. In the past, he has worked for the USAA insurance company and more recently spent four years with Motorola's cellular software division. He is the co-author of Using Samba.

Marc Loy

Marc Loy is a senior programmer at Galileo Systems, LLC, but his day job seems to be teaching Java and Perl to various companies -- including Sun Microsystems. He has played with Java since the alpha days and can't find his way back to C. He is developing an interactive learning application at Galileo written entirely in Java. He received his master's degree in computer science at the University of Wisconsin-Madison, and still lives in Madison with his partner, Ron Becker. He does find time to relax by playing the piano and/or throwing darts, depending on how successful the day of teaching or programming was.

Dave Wood

David Wood is Technical Director of Plugged In Software in Brisbane, Australia, where he works with a wonderful team producing Java custom software. In his eclectic career he has been a ship's navigator, deep sea salvage engineer, and aerospace project manager for the U.S. Navy, and consulted to Lawrence Livermore National Laboratory and Netscape. David enjoys hiking and sailing with his very patient wife and teaching his son Perl before he goes to kindergarten. David holds degrees in mechanical, electrical, aeronautical, and astronautical engineering from the U.S. Naval Postgraduate School and the Virginia Military Institute.

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The image on the cover of Java Servlet Programming is a copper teakettle. The cover was designed by Hanna Dyer using a series design by Edie Freedman. The image was photographed by Kevin Thomas and manupulated in Adobe Photoshop by Michael Snow. The cover layout was produced with QuarkXPress 3.3 using the Bodoni Black font from URW Software and Bodoni BT Bold Italic from Bitstream. The inside layout was designed by Nancy Priest. Text was produced in FrameMaker 5.5 using a template implemented by Mike Sierra. The heading font is Bodoni BT; the text font is New Baskerville. The illustrations that appear in the book were created in Macromedia Freehand 7 and Adobe Photoshop 4 by Robert Romano. Whenever possible, our books use a durable and flexible lay-flat binding, either RepKover or Otabind. If the pagecount exceeds this type of binding's limit, perfect binding is used.

I've read a lot of technical books, and they seem to fall into one of two categories: swimming in unorganized detail or well-organized explanations with a frustrating lack of detail. This book strikes the balance perfectly. One of the joys of reading it is that I know I don't have to be sitting beside a computer with a Web browser to call up the JDK documentation for every new class that's mentioned, as I must for so many other books.

I'm new to Java, having taken only a few courses, and I must say that this is the only book I've found so far that I can read anywhere and get a complete picture of some aspect of Swing. It's so good that I often find myself absent-mindedly looking up core Java information in the book only to remember that it covers only Swing. Now what I need is a core Java book with the same layout and thorough coverage!

I notice that several people complain that the code examples don't work. I'm willing to give the book five... whatever they are... because I never try to run the examples; that's not my learning style. I study the examples as illustrations of the theories presented, and I study them thoroughly, but like written English I don't sweat minor errors. If I get the concepts, that's enough for me. So, if you learn by typing the code into your system and trying it out, perhaps you won't be so enthusiastic about this book. However, if you're like me and want to read a definitive explanation of all things Swing, then you need this book.

I was much relieved to find other reviews which commented about the buggy code. I too have a rather large investement in O'Reilly books - of which I am proud, but this book is not one of them. I will be glad to change that when I can work through the code and the book simultaneously.

As i pondered through several bookshops in search for a nice complete book on Swing i came across this one. And remebering my good past experience with O'Reilly books i decided to buy it.

I had not done any GUI programming before, only progs with horrible interfaces but since i have bought and read this book all my apps have this little something that they didn't have before.

In my opinion this book is great for anyone who knows Java well and wants to get into making Java look good and adding an easy-to-use interface to their applications. It gives a very detailed account of the different classes and how to use them, with useful examples (thinking back in horror to Bjarnes C++ reference :-)).

I would like to thank you again for a job well done. And am happy about money well spend. :-)

I'm in the first chapter and I find it very frustrating that I cannot get the first example to build (or the second). Granted I'm new at Java, however, I do expect to have examples work. These examples are designed to teach and provide direction. If I had the Java skills and the time to debug these examples I would not need this book! While many readers may find it enjoyable to debug the examples, I do not. I have neither the time nor the inclination to perform the work that I've paid the authors to perform. If any of the authors purchased a device and then had to debug it to get it to work, would they be happy with it's quality? I doubt it.

I have purchased and live by other O'Reilly books, however, this one will be used as a bookend and I will look at other Java Swing books. This one does not live up to the O'Reilly standard and I will recommend that others avoid it as well.

I am unclear as to why you have not officially 'fixed' errors in code in your book 'Java Swing'. Let me initially state that I am not writing to 'bash' you, I am simply expressing my disappointment and surprise.

Case in point.....

pg.35 'Sim......Frame'.... Excuse me, but there are three authors of this book, correct? Doesn't it bother any of you that since 1998 (first printing?) no repair has been done to the code here? Make this code work as is.... go ahead.. guess what.... you can't!!!!! (How about internalFrame.setVisible(true);)??????

I'm a beginner at this, it's true, but so are many other people who spend their money on a book the three of you wrote. I'm not declaring myself an expert by any means, but I don't understand why things like this aren't addressed and fixed.

The next example..... 'Web Site Manager'

It is described as 'a bit of fun' and 'robust error checking gets in the way of having fun, and that's all we're really trying to accomplish with this application.' Fun for who??? Didn't you put yourselves in the shoes of your readers?? This example is a monolith. Yes, I'm impressed that there are methods and classes flying all over the place, but how does it help me if I can't get it to run??

This book cost me $44.95 at Barnes and Noble. I'm not writing to get my money back, I'm trying to let you see this book from the perspective of a non-expert.

(And why write with experts as your target audience? I'm willing to bet you that the majority of people buying this book are anywhere from 6 to 12 months into Java.)

I've purchased other Java books, in Horton the code is bare for the sake of teaching, and the code runs. In Deitel and Deitel the code and concepts progress through many levels, but the code runs. In Java Black Book the code runs. In Core Java2 the code runs. Why do I assume that as I continue through your book I'll be visiting this web page for errata in each chapter???