From the creators of Recruitforce.com

SWING
This is a mirror of the Official web-site for the book Swing and Swing 2nd edition, a fast-paced guide with production-quality code examples, by Matthew Robinson and Pavel Vorobiev.

Order from Amazon or Manning

  • Covers all Swing components
  • Unique, detailed examples
  • Advanced Tables, Trees, Text, L&F, MDI
  • Building HTML and XML Editors
  • Printing, Drag & Drop, and Java2D with Swing

    Published by Manning Publications Co.

    Preview PDF chapters (1st edition):
  • Chapter 18 Tables
  • Chapter 19 Constructing a Word Processor
  • Chapter 22 Printing

    Join the book's public forum: Author Online

  • Book News
    3/1/03 According to Manning, the first edition was a bestseller and the second edition has started off with a solid pipeline of orders. Meanwhile, after a visit to Barnes & Noble it looks like the 2nd edition has finally made its way into bookstores. Please let us know what you think: email us.
    11/4/02 We're happy to announce that the 2nd edition is finally being published and will be shipped to stores and online resellers in Feb., 2003. We are also proud to have James Gosling as author of this edition's foreword.
    12/3/01 The first draft of the second edition is approaching completion. We have many new examples, revised text and additional material to bring the book up to date with J2SE 1.4. For example we are covering JSpinner, JFormattedTextField, the new Focus and Keyboard architectures, scrollable tabbed panes, variable height JTable rows, indeterminate progress bars, etc. One of the biggest changes is the replacement of the RTF Word Processor chapter with a new chapter on constructing an HTML Editor application. There will also be two new chapters on Drag and Drop and Constructing an XML editor with Swing.
    5/4/01 The book has been translated into Korean and Manning sent us copies. Cover scans: [Front] [Back]
    5/1/01 Four free copies were given away this week to participants in the JavaRanch JFC/AWT/Swing forum.
    1/27/01 Manning printed a third batch of books and Mani Subramanian completed formatting the HTML version of the manuscript. We really appreciate it and Manning sent him a complimentary book for the help.
    1/3/01 A Spanish translation is underway at http://traducciondeswing.iespana.es/traducciondeswing/
    6/1/00 A summarized version of chapter 22 appeared in the June issue of Java Report magazine.
    3/23/00 Chapters 18 and 22 featured at Sun's Java Developer Connection.
    12/2/99 Book production finished. Shipped to stores and online resellers.
    About the Book

    "The authors have done an excellent job of mapping out the territory and explaining the standard patterns that make Swing great. I love the way they have gone beyond just laying out the APIs to covering issues about what makes a good user interface - what makes an appication easy to understand and use. And they go beyond the usual snippets of code to complete applications. This is a great way to inter-relate all of the parts of the Swing API. "

    James Gosling
    Vice President and Sun Fellow
    Sun Microsystems, Inc.
    JavaSoft Division

    Swing has something for all Java audiences, but is mainly intended for experienced and advanced GUI developers. Each chapter begins with a discussion of relevant classes and interfaces, often interspersed with small example applications to demonstrate key features. The remainder is then devoted to extensive, real-world examples that are explained thoroughly and are often built on top of one another. These examples are the main thrust of this book and make up most of its content. 

    Each Swing component is covered in depth with several accompanying examples. We have also identified five areas of Swing that deserve significantly more attention than others due to their size and complexity: the text package, the tree package, the table package, MDI environments, and pluggable look and feel. Thus, you will find the examples of this material particularly extensive. Additionaly, we have included special topics chapters on Printing, XML, and Drag & Drop -- all in terms of Swing.

    Mirror Sites

    Taiwan mirror by National Taiwan University
    New Zealand mirror by NewSoftland Ltd.
    Niue mirror hosted by JavaIT.net
    Denmark mirror hosted by Asbjoern Grandt
    Sweden mirror hosted by Set Lonnert
    Bulgaria mirror Technical Unversity of Sofia
    Germany mirror hosted by Uwe Gunther
    Spain mirror translation by javaHispano.org
    Netherlands mirror hosted by Jurgen Stroo
    New Jersey mirror hosted by JAVAOLYMPUS

  • About setting up a mirror

    Book Reviews

    JavaRanch
    Slashdot
    DevX
    Association of C/C++ users
    Ed's Book Reviews

    Featured in
    Contact

    Matt: matthewbrobinson@yahoo.com
    Pavel: pvorobiev@yahoo.com

    All Swing-related questions will be answered in the Author Online  forum.

  • Second Edition - Chapter Updates and Examples

    The ZIP files below include all 2nd edition examples. Each ZIP file also contains an MS Word document detailing some of the changes and additions from the 1st edition to the 2nd. These documents are not complete chapters - to obtain complete 2nd edition chapters the book must be purchased.

    Chapter 1: Swing Overview
    Chapter 2: Swing Mechanics
    Chapter 3: Frames, Panels and Borders
    Chapter 4: Layout Managers
    Chapter 5: Labels and Buttons
    Chapter 6: Tabbed Panes
    Chapter 7: Scrolling Panes
    Chapter 8: Split Panes
    Chapter 9: Combo Boxes
    Chapter 10: List Boxes and Spinners
    Chapter 11: Text Components and Undo
    Chapter 12: Menus, Toolbars and Actions
    Chapter 13: Progress Bars, Sliders and Scroll Bars
    Chapter 14: Dialogs
     
    Chapter 15: Layered Panes
    Chapter 16: Desktops and Internal Frames
    Chapter 17: Trees
    Chapter 18: Tables
    Chapter 19: Inside Text Components
    Chapter 20: Constructing an HTML Editor Application
    Chapter 21: Pluggable Look and Feel
    Chapter 22: Printing
    Chapter 23: Constructing an XML Editor
    Chapter 24: Drag and Drop
    Appendix A: Java Web Start
    Appendix B: Resources
    Bibliography
     
    First Edition - Chapters and Examples

    Note that the material freely available here represents Swing in its final stages of development before it was sent to Manning's copyeditors and typesetters. The actual book available for purchase features significant improvements in formatting and presentation, including annotated code callouts (see PDF chapters above).

    CHAPTERS: swingdoc.zip: All chapters in Word '97 format (2.7 MB). 
    EXAMPLES: swing.zip: All chapter examples (7.0 MB). 
     
  • Click on  to download individual chapter ZIP archive: includes all examples.
  • Click on HTML to view chapter online.
  • Click on blue hyperlink to download the chapter in Word '97 format.

    Front Matter
    Part I. Introduction

    N/A HTML 1. Swing Overview
    HTML 2. Swing Mechanics
     
    Part II. The Basics
     
    HTML 3. Frames, Panels and Borders
    HTML 4. Layouts
    GridBagLayout coverage by James Tan
    HTML 5. Labels and Buttons
    HTML 6. Tabbed Panes
    HTML 7. Scrolling Panes
    HTML 8. Split Panes
    HTML 9. Combo Boxes
    HTML 10. List Boxes
    HTML 11. Text Components and Undo
    HTML 12. Menus, Toolbars and Actions
    HTML 13. Progress Bars, Scroll Bars and Sliders
    HTML 14. Dialogs
    Part III. Advanced Topics
     
    HTML 15. Layered Panes and Custom MDI
    HTML 16. Desktops and Internal Frames
    HTML 17. Trees
    HTML 18. Tables
    HTML 19. Inside Text Components
    Date and Time editor by David Karr
    HTML 20. Constructing a Word Processor
    HTML 21. Pluggable Look & Feel
     
    Part IV. Special Topics
     
    HTML 22. Printing
    HTML 23. Java2D
    HTML 24. Accessibility
    HTML 25. JavaHelp
    HTML 26. Swing and CORBA
    HTML 27. Contributions
    by Albert Ting and Ron Widitz
     
    Appendix A. Sources of Information
    Bibliography
    UI Guidelines by David Anderson (http://www.uidesign.net/)
    Annotated code callouts by David Karr
    HTML chapters formatted by Mani Subramanian