Buying Options
Java Swing, Second Edition
Print $59.99
Add to Cart
Print+Ebook $65.99
Add to Cart
Ebook $47.99
(PDF)
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £45.99
Add to Cart
What is this?

Product Editions

  1. Java Swing, Second Edition - November 2002
  2. Java Swing - September 1998
Description
This second edition of Java Swing thoroughly covers all the features available in Java 2 SDK 1.3 and 1.4. More than simply a reference, this new edition takes a practical approach. It is a book by developers for developers, with hundreds of useful examples, from beginning level to advanced, covering every component available in Swing. Whether you're a seasoned Java developer or just trying to find out what Java can do, you'll find Java Swing, 2nd edition an indispensable guide.
Full Description
Table of Contents
  1. Chapter 1 Introducing Swing

    1. What Is Swing?

    2. Swing Features

    3. Swing Packages and Classes

    4. The Model-View-Controller Architecture

    5. Working with Swing

    6. The Swing Set Demo

    7. Reading This Book

  2. Chapter 2 Jump-Starting a Swing Application

    1. Upgrading Your AWT Programs

    2. A Simple AWT Application

    3. Including Your First Swing Component

    4. Beyond Buttons

    5. What Is an Internal Frame?

    6. A Bigger Application

  3. Chapter 3 Swing Component Basics

    1. Understanding Actions

    2. Graphical Interface Events

    3. Graphics Environments

    4. Sending Change Events in Swing

    5. The JComponent Class

    6. Responding to Keyboard Input

  4. Chapter 4 Labels and Icons

    1. Labels

    2. Working with Images

    3. Support for HTML

    4. Icons

    5. Implementing Your Own Icons

    6. Dynamic Icons

    7. The ImageIcon Class

  5. Chapter 5 Buttons

    1. The ButtonModel Interface

    2. The DefaultButtonModel Class

    3. The AbstractButton Class

    4. The JButton Class

    5. The JToggleButton Class

    6. The JToggleButton.ToggleButtonModel Class

    7. The JCheckBox Class

    8. The JRadioButton Class

    9. The ButtonGroup Class

  6. Chapter 6 Bounded-Range Components

    1. The Bounded-Range Model

    2. The JScrollBar Class

    3. The JSlider Class

    4. The JProgressBar Class

    5. Monitoring Progress

  7. Chapter 7 Lists, Combo Boxes, and Spinners

    1. Lists

    2. Representing List Data

    3. Handling Selections

    4. Displaying Cell Elements

    5. The JList Class

    6. Combo Boxes

    7. The JComboBox Class

    8. Spinners

    9. Spinner Models

    10. Spinner Editors

  8. Chapter 8 Swing Containers

    1. A Simple Container

    2. The Root Pane

    3. Basic RootPaneContainers

    4. The JFrame Class

    5. The JWindow Class

    6. The JApplet Class

  9. Chapter 9 Internal Frames

    1. Simulating a Desktop

    2. The JInternalFrame Class

    3. The JDesktopPane Class

    4. The DesktopManager Interface

    5. Building a Desktop

  10. Chapter 10 Swing Dialogs

    1. The JDialog Class

    2. The JOptionPane Class

    3. Using JOptionPane

    4. Simple Examples

    5. Getting the Results

    6. A Comparison: Constructors Versus Static Methods

    7. Using Internal Frame Dialogs with JDesktopPane

  11. Chapter 11 Specialty Panes and Layout Managers

    1. The JSplitPane Class

    2. The JScrollPane Class

    3. The JTabbedPane Class

    4. Layout Managers

    5. The SpringLayout Class

    6. Other Panes

  12. Chapter 12 Chooser Dialogs

    1. The JFileChooser Class

    2. The File Chooser Package

    3. The Color Chooser

    4. The JColorChooser Class

    5. Developing a Custom Chooser Panel

    6. Developing a Custom Preview Panel

    7. Developing a Custom Dialog

  13. Chapter 13 Borders

    1. Introducing Borders

    2. Painting Borders Correctly

    3. Swing Borders

    4. Creating Your Own Border

  14. Chapter 14 Menus and Toolbars

    1. Introducing Swing Menus

    2. Menu Bar Selection Models

    3. The JMenuBar Class

    4. The JMenuItem Class

    5. The JPopupMenu Class

    6. The JMenu Class

    7. Selectable Menu Items

    8. Toolbars

  15. Chapter 15 Tables

    1. The JTable Class

    2. Implementing a Column Model

    3. Table Data

    4. Selecting Table Entries

    5. Rendering Cells

    6. Editing Cells

    7. Next Steps

  16. Chapter 16 Advanced Table Examples

    1. A Table with Row Headers

    2. Large Tables with Paging

    3. A Table with Custom Editing and Rendering

    4. Charting Data with a TableModel

  17. Chapter 17 Trees

    1. A Simple Tree

    2. Tree Models

    3. The JTree Class

    4. Tree Nodes and Paths

    5. Tree Selections

    6. Tree Events

    7. Rendering and Editing

    8. What Next?

  18. Chapter 18 Undo

    1. The Swing Undo Facility

    2. The UndoManager Class

    3. Extending UndoManager

  19. Chapter 19 Text 101

    1. The Swing Text Components

    2. The JTextComponent Class

    3. The JTextField Class

    4. A Simple Form

    5. The JPasswordField Class

    6. The JTextArea Class

    7. How It All Works

  20. Chapter 20 Formatted Text Fields

    1. The JFormattedTextField Class

    2. Handling Numerics

    3. The DefaultFormatter Class

    4. The MaskFormatter Class

    5. The InternationalFormatter Class

    6. The DateFormatter Class

    7. The NumberFormatter Class

    8. The DefaultFormatterFactory Class

    9. Formatting with Regular Expressions

    10. The InputVerifier Class

  21. Chapter 21 Carets, Highlighters, and Keymaps

    1. Carets

    2. Highlighters

    3. Keymaps

  22. Chapter 22 Styled Text Panes

    1. The JTextPane Class

    2. AttributeSets and Styles

    3. The Document Model

    4. Document Events

    5. Views

    6. The DocumentFilter Class

    7. The NavigationFilter Class

  23. Chapter 23 Editor Panes and Editor Kits

    1. The JEditorPane Class

    2. Overview of the Editor Kits

    3. HTML and JEditorPane

    4. Hyperlink Events

    5. The HTMLEditorKit Class

    6. Extending HTMLEditorKit

    7. Editing HTML

    8. Writing HTML

    9. Reading HTML

    10. A Custom EditorKit

  24. Chapter 24 Drag and Drop

    1. What Is Drag and Drop?

    2. The Drop API

    3. The Drag Gesture API

    4. The Drag API

    5. Rearranging Trees

    6. Finishing Touches

  25. Chapter 25 Programming with Accessibility

    1. How Accessibility Works

    2. The Accessibility Package

    3. Other Accessible Objects

    4. Types of Accessibility

    5. Classes Added in SDK 1.3 and 1.4

    6. The Accessibility Utility Classes

    7. Interfacing with Accessibility

  26. Chapter 26 Look and Feel

    1. Mac OS X and the Default Look-and-Feel

    2. How Does It Work?

    3. Key Look-and-Feel Classes and Interfaces

    4. The MultiLookAndFeel

    5. Auditory Cues

    6. Look-and-Feel Customization

    7. Creation of a Custom Look-and-Feel

  27. Chapter 27 Swing Utilities

    1. Utility Classes

    2. The Timer Class

    3. Tooltips

    4. Rendering Odds and Ends

    5. Event Utilities

  28. Chapter 28 Swing Under the Hood

    1. Working with Focus

    2. Multithreading Issues in Swing

    3. Lightweight Versus HeavyweightComponents

    4. Painting and Repainting

    5. Creating Your Own Component

  1. Appendix A Look-and-Feel Resources

  2. Appendix B Component Actions

    1. JButton

    2. JCheckBox

    3. JCheckBoxMenuItem

    4. JComboBox

    5. JDesktopPane

    6. JEditorPane

    7. JFormattedTextField

    8. JInternalFrame

    9. JLabel

    10. JList

    11. JMenu

    12. JMenuBar

    13. JMenuItem

    14. JOptionPane

    15. JPasswordField

    16. JPopupMenu

    17. JProgressBar

    18. JRadioButton

    19. JRadioButtonMenuItem

    20. JRootPane

    21. JScrollBar

    22. JScrollPane

    23. JSlider

    24. JSpinner

    25. JSplitPane

    26. JTabbedPane

    27. JTable

    28. JTextArea

    29. JTextField

    30. JTextPane

    31. JToggleButton

    32. JToolBar

    33. JToolTip

    34. JTree

    35. JViewport

    36. Non-JComponent Containers

    37. Auditory Feedback Actions

  3. Colophon

View Full Table of Contents
Product Details
Title:
Java Swing, Second Edition
By:
Marc Loy, Robert Eckstein, Dave Wood, James Elliott, Brian Cole
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
November 2002
Ebook Release:
June 2009
Pages:
1280
Print ISBN:
978-0-596-00408-8
| ISBN 10:
0-596-00408-7
Ebook ISBN:
978-0-596-10334-7
| ISBN 10:
0-596-10334-4
Customer Reviews
About the Authors
  1. 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.

    View Marc Loy's full profile page.

  2. 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.

    View Robert Eckstein's full profile page.

  3. 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.

    View Dave Wood's full profile page.

  4. James Elliott

    a senior software engineer at Berbee, with over ten years professional experience as a systems developer. He started designing with objects well before work environments made it convenient, and has a passion for building high-quality Java tools and frameworks to simplify the tasks of other developers.

    View James Elliott's full profile page.

  5. Brian Cole

    has been working with Java since its early days and teaches the language at venues ranging from Sun Microsystems to public high school. He has a BA from Oberlin College and an M.S. from the University of Wisconsin-Madison.

    View Brian Cole's full profile page.

  6. View All Authors

Colophon

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 animal on the cover of Java Swing, Second Edition, is a spider monkey (Ateles geoffroyi). Most spider monkeys can be found in the forests of Central America from Southern Mexico to Panama. Almost all varieties of spider monkeys live exclusively in trees and maintain a diet of fruit and nuts.

What gives the spider monkey its name is its long limbs and tail (it sometimes resembles a spider as it moves). A. geoffroyi's fur is black, brown, golden, or reddish.

Spider monkeys are social and can form groups of approximately 30 animals. They live in treetops and forage diurnally in troops often led by females, which have a more active role than males in the food-gathering process. Spider monkeys are often seen hanging by one branch or by their unusually long tails, which basically function as a fifth limb. They can even grasp objects with their tails.

When approached or threatened, spider monkeys will bark and flail wildly, which usually scares off intruders. If this tactic is unsuccessful, they will break away from their groups and retreat.

Matt Hutchinson was the production editor and copyeditor for Java Swing, Second Edition. Matt Hutchinson and Mary Brady proofread the book. Tatiana Apandi Diaz and Sarah Sherman provided quality control. Genevieve d'Entremont and Andrew Savikas provided production assistance. Brenda Miller updated the index from the first edition.

Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

David Futato designed the interior layout. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Matt Hutchinson.

  • Book cover of Java Swing