Graphic Java 2, Volume 2, Swing

Graphic Java 2, Volume 2, Swing

2.91 (12 ratings by Goodreads)
By (author)  , By (author) 

List price: US$71.00

Currently unavailable

We can notify you when this item is back in stock

Add to wishlist

AbeBooks may have this title (opens in new window).

Try AbeBooks


Graphic Java 2 is quite simply the most comprehensive guide to the Java Foundation Classes available. Written for experienced programmers looking for thorough and detailed explanations of the JFC libraries, Volume 2 covers all aspects of the swing framework. Swing is the long-awaited successor to the AWT's heavyweight components. It provides many components that AWT developers could previously only dream about -- or purchase -- such as Tooltips, tables, trees, sliders, a complete document framework, and more. This book provides comprehensive coverage of the Swing framework, the designs behind it, and the use of Swing components. Thousands of experienced Java developers are ready to move beyond AWT's limits. This book shows them how to do so. Together with Graphic Java Volume 1 (AWT) and Volume 3 (2D API), it gives developers all the tools they need to build professional, customizable cross-platform applications that fully leverage the new Java Foundation Classes -- and to deliver those applications fast.
show more

Product details

  • Mixed media product | 1600 pages
  • 172.72 x 223.52 x 43.18mm | 1,133.98g
  • Prentice Hall
  • Upper Saddle River, United States
  • English
  • 3rd edition
  • with figs.
  • 0130796670
  • 9780130796677
  • 2,171,165

Back cover copy

7966G-2 Master the Java Foundation Classes with Graphic Java 2, the most complete and comprehensive guide to the AWT, Swing, and the 2D API

VOLUME 2: SWING (This is a 2 Volume set)

Swing gives Java application programmers world-class tools for building professional, customizable cross-platform GUIs. This comprehensive reference by former Sun engineer David Geary shows experienced programmers how to take full advantage of Swing's power. Practical explanations and robust code examples provide the resources you need to build Java applications with sophisticated graphical user interfaces.

Graphic Java is the one exhaustive reference that contains everything you need to know about Swing. In depth explanations are coupled with class diagrams and code examples for all of the key components, including:

Buttons and labels Progress bars and sliders Frames, windows, and dialogs Internal frames and desktop panes Color and file choosers Menus and toolbars Lists and combo boxes Text components Tables and trees You'll discover the key design considerations associated with Swing development, including Swing's object-oriented idioms and design patterns, and the pluggable look and feel architecture. You will understand how to use the Swing components, but more importantly you will have an understanding of how the components are designed and how they fit together within the Swing framework.
show more

Table of contents


How to Use This Book.

Component Summaries.


Swing Bugs.

Using the CD-ROM.

Swing and the JDK.

Code Examples from the Book.

Applets vs. Applications.

Conventions Used in This Book.


1. Introduction.

Swing History. Lightweight vs. Heavyweight Components. Swing Components. AWT Replacement Components. Additional Swing Components. J Components. Pluggable Look and Feel. An Overview of the Swing Packages. Swing and the AWT. Peers vs. Pluggable Look and Feel. Getting Started. Using Swing with Internet Browsers. Swing Resources. Parting Shots.

2. Swing Basics.

Applets and Applications. Applets. The JApplet Class. Applications. The JFrame Class. Applet/Application Combinations. GJApp. Mixing Swing and AWT Components. Zorder. Swing Popup Menus. Scrolling. Internal Frames. Swing and Threads. Ramifications of Swing's Single-Threaded Design. SwingUtilities invokeLater and invokeAndWait Methods. Parting Shots.

3. Swing Component Architecture.

Classic Model-View-Controller Architecture. Pluggable Views and Controllers. View Updates. Swing MVC. Swing Components. A Static Perspective. A Dynamic Perspective. Models. UI Delegates. Component UI Scenarios. Listeners. Parting Shots.

4. The JComponent Class.

An Overview of the JComponent Class. Borders. Accessibility Support. Double Buffering. Debug Graphics. AutoScrolling. Tooltips. Keystroke Handling and Client Properties. The JComponent Class. Swing Components are AWT Containers. Minimum, Maximum, and Preferred Sizes. Rendering JComponents. Custom Painting in Swing Components. Overriding Paint Methods in AWT Components. Overriding Paint Methods in Swing Components. Paint, Repaint, and Update Methods. Validate, Invalidate, and Revalidate Methods. Opaque vs. Transparent Components. Immediate Painting of Swing Components. Double Buffering. Double Buffering in Custom Components. Debug Graphics. Autoscrolling. Autoscrolling in Custom Components. Tooltips. Tooltips Based on Mouse Position. Preferred Locations for Tooltips. Customizing Tooltip Behavior. Customizing Tooltip Look and Feel. Keystroke Handling. Client Properties. Focus Management. Accessibility. Parting Shots.

5. Borders, Icons, and Actions.

Borders. Borders and Insets. Swing Border Types. Opaque vs. Transparent Borders. The Border Package. The Border Interface. The AbstractBorder Class. The Border Factory - Sharing Borders. Replacing Built- in Borders. Implementing Custom Borders. Icons. Associating an Icon with a Component. Sharing Icons Among Components. Image Icons. Animated Image Icons. Actions. Actions as a Central Point of Control. Action Constants. Parting Shots.

6. Utilities.

Timers. The Timer Class. Event Listener Lists. The EventListenerList Class. Swing Utilities. Swing Constants. BoxLayout and the Box Class. BoxLayout. The Box Class. Progress Monitoring. ProgressMonitor. ProgressMonitorInputStream. Undo/Redo. A Simple Undo/Redo Example. UndoableEditSupport. Compound Edits. Undo Manager. State Edits. Parting Shots.

7. Pluggable Look and Feel.

Look-and-Feel Architecture. Look and Feels. Look-and-Feel Defaults. UI Manager. UI Resources. The Java Look and Feel. Client Properties. Themes. Auxiliary UIs. Parting Shots.


8. Labels and Buttons.

JLabel and JButton. JLabel. JLabel Properties. JLabel Events. JLabel Class Summaries. Buttons. Button Class Hierarchy. JButton. JButton Properties. JButton Events. JButton Class Summaries. AWT Compatibility. Parting Shots.

9. Toggle Buttons, Check Boxes, and Radio Buttons.

JToggleButtons. JToggleButton Properties. JToggleButton Events. JToggleButton Class Summaries. AWT Compatibility. Button Groups. Check Boxes. JCheckBox Properties. JCheckBox Events. JCheckBox Class Summaries. Radio Buttons. JRadioButton Properties. JRadioButton Events. JRadioButton Class Summaries. AWT Compatibility. Parting Shots.

10. Menus and Toolbars.

Menus, Menu Bars, and Toolbars. Menus and Popup Menus. JMenuItem. Menu Item Accelerators and Mnemonics. JMenuItem Properties. JMenuItem Events. JMenuItem Class Summaries. AWT Compatibility. JCheckBoxMenuItem. JCheckBoxMenuItem Properties. JCheckBoxMenuItem Events. JCheckBoxMenuItem Class Summaries. AWT Compatibility. JRadioButtonMenuItem. JRadioButtonMenuItem Properties. JRadioButtonMenuItem Events. JRadioButtonMenuItem Class Summaries. AWT Compatibility. JMenu. Dynamically Modifying Menus. Pull-right Menus. JMenu Properties. JMenu Events. JMenu Class Summaries. AWT Compatibility. Menu Elements. Implementing the MenuElement Interface. JPopupMenu. Popup Trigger. Light/Medium/HeavyWeight Popup Menus. Popup Menu Invokers. JPopupMenu Properties. JPopupMenu Events. JPopupMenu Class Summaries. AWT Compatibility. JMenuBar. Menu Bar Menus and Components. JMenuBar Properties. JMenuBar Events. JMenuBar Class Summaries. AWT Compatibilities. JToolBar. Rollover Toolbars. Using Actions with Toolbars. Floating Toolbars. Toolbar Buttons with Fixed- Location Tooltips. JToolBar Properties. JToolBar Events. JToolBar Class Summaries. AWT Compatibility. Parting Shots.

11. Progress Bars, Sliders, and Separators.

JProgressBar. Progress Bars and Threads. JProgressBar Properties. JProgressBar Events. JProgressBar Class Summaries. AWT Compatibility. JSlider. Filled Sliders. Slider Tick Marks. Slider Labels. Inverting Slider Values. Slider Extent. JSlider Properties. JSlider Events. JSlider Class Summaries. AWT Compatibility. JSeparator. Separators and Boxes. JSeparator Properties. JSeparator Events. AWT Compatibility. Parting Shots.

12. Lightweight Containers.

JPanel. JPanel Properties. JPanel Events. JPanel Class Summaries. AWT Compatibility. JRootPane. The RootPaneContainer Interface. Glass Panes. Content Panes. JRootPane Properties. JRootPane Events. JRootPane Class Summaries. AWT Compatibility. JLayeredPane. Zorder for Lightweight Components Revisited. Assigning Layers to Components. Positioning Components in the Same Layers. Using the Drag Layer. JLayeredPane Properties. JLayeredPane Class Summaries. AWT Compatibility. JTabbedPane. Tab Placement. JTabbedPane Properties. JTabbedPane Events. JTabbedPane Class Summaries. JSPlitPane. JSplitPane Properties. JSplitPane Events. JSplitPane Class Summaries. AWT Compatibility. Parting Shots.

13. Scrolling.

JViewport. Dragging a Viewport's View. Using the scrollRectToVisibile Method. JViewport Properties. JViewport Events. JViewport Class Summaries. AWT Compatibility. JScrollPane. Scrollpane Headers. Scrollpane Corners. JScrollPane Properties. JScrollPane Events. JScrollPane Class Summaries. AWT Compatibility. The Scrollable Interface. JScrollBar. Manual Scrolling with Swing's JScrollBar Class. Block and Unit Increments. JScrollBar Properties. JScrollBar Events. JScrollBar Class Summaries. AWT Compatibility. Parting Shots.

14. Windows and Dialogs.

JWindow. JWindow Properties. JWindow Class Summaries. AWT Compatibility. JDialog. JDialog Properties. JDialog Class Summaries. AWT Compatibility. JOptionPane. Internal Frames. Creating Dialogs with JOptionPane Static Methods. Message Dialogs. Confirmation Dialogs. Input Dialogs. Option Dialogs. JOptionPane Properties. JOptionPane Events. JOptionPane Class Summaries. AWT Compatibility. Parting Shots.

15. Internal Frames and Desktop Panes.

JInternalFrame. JInternalFrame Properties. JInternalFrame Events. AWT Compatibility. JDesktopPane. JDesktopPane Properties. JDesktopPane Events. JDesktopPane Class Summaries. AWT Compatibility. DesktopManager. DesktopManager Class Summaries. Parting Shots.

16. Choosers

JFileChooser. File Chooser Types. Accessory Components. Filtering File Types. File Views. Multiple Selection. JFileChooser Properties. JFileChooser Events. JFileChooser Class Summaries. AWT Compatibility. JColorChooser. Displaying Color Choosers in Dialogs. Customizing Color Choosers. JColorChooser Properties. JColorChooser Events. JColorChooser Class Summaries. AWT Compatibility. Parting Shots.

17. Lists.

List Models. AbstractListModel. DefaultListModel. List Selections. List Cell Renderers. JList Properties. JList Events. JList Class Summaries. AWT Compatibility. Parting Shots.

18. Combo Boxes.

JComboBox vs. JList. The JComboBox Component. Combo Box Models. ComboBoxModel. MutableComboBoxModel. DefaultComboBoxModel. Combo Box Cell Renderers. Combo Box Key Selection Managers. Using the Default Key Selection Managers. Custom Key Selection Managers. Programmatic Key Selection. Combo Box Editors. JComboBox Properties. JComboBox Events. JComboBox Class Summaries. AWT Compatibility. Parting Shots.

19. Tables.

Tables and Scrolling. Block and Unit Increments. Table Models. Table Data Models. The TableModel Interface. AbstractTableModel. DefaultTableModel. Table Models and Default Renderers and Editors. Table Columns. Column Resize Modes. Column Widths. Table Column Models. The DefaultTableColumnModel Class. Column Margins. Hiding Columns. Locking the Left-Hand Column. Table Selection. Rendering and Editing. Using Table Cell Renderers and Editors. Table Cell Rendering. Cell Editors. Table Cell Editors. Implementing the TableCellEditor Interface. Table Rows. Row Height. Rendering by Rows. Table Decorators. Sorting Decorators. Table Headers. JTableHeader. Column Header Renderers and Header ToolTips. JTable Properties. Table Events. Table Model Events. TableColumnModel Events. List Selection Events. JTable Class Summaries. AWT Compatibility. Parting Shots.

20. Trees.

Creating Trees. Tree Nodes. The TreeNode Interface. The MutableTreeNode Interface. The DefaultMutableTreeNode Class. Tree Paths. Tree Models. Default TreeModel. Tree Selection. DefaultTreeSelectionModel. Tree Cell Rendering. DefaultTreeCellRenderer. Metal Look and Feel. Root Nodes and Root Handles. Tree Cell Editing. Extending DefaultCellEditor. DefaultTreeCellEditor. Rendering and Editing: A Case Study. The Test Class. The SelectableFile and FileNode Classes. The Renderers. The Editors. JTree Properties. Tree Events. JTree Class Summaries. AWT Compatibility. Parting Shots.

21. Text Fundamentals.

Swing Text Components. The Swing Text Package. Actions. Text Actions. Actions and Editor Kits. Keymaps. Documents. Custom Documents. Document Listeners. Carets and Highlighters. Carets. Caret Listeners. Custom Carets. Highlighters. Undo/Redo. JTextComponent. JTextComponent Properties. Parting Shots.

22. Text Components.

JTextField. Horizontal Visibility and Scroll Offset. Laying Out Text Fields. Validating Text Fields. JTextField Component Summary. JTextField Properties. JTextField Events. JTextField Class Summaries. AWT Compatibility. JPassword Field. JPasswordField Component Summary. JPasswordField Properties. JPasswordField Class Summary. JTextArea. JTextArea Component Summary. JTextArea Properties. JTextArea Class Summaries. AWT Compatibility. JEditorPane. JEditorPane Properties. JEditorPane Events. JEditorPane Class Summaries. JTtextPane. Embedding Icons and Components. Marking Content with Attributes. JTextPane Properties. JTextPane Class Summaries. AWT Compatibility. Parting Shots.

23. Customizing Text Components.

Overview. Attribute Sets and Style Constants. Custom Actions. Views. Implementing Custom Views. Styles and Style Contexts. Elements. Parting Shots.

Appendix A.

Class Diagrams. Class Diagram Legend. An Example Class Diagram.

Appendix B.

Pluggable Look & Feel Constants.

show more

About David H. Geary

David Gearywas lead engineer for the user interface toolkit for JavaSoft's Java Management API. He has been developing GUIs and using object-oriented technology since 1984, including C++, Smalltalk, Eiffel, Objective-C and now Java. He is currently an independent Java consultant.
show more

Rating details

12 ratings
2.91 out of 5 stars
5 8% (1)
4 33% (4)
3 17% (2)
2 25% (3)
1 17% (2)
Book ratings by Goodreads
Goodreads is the world's largest site for readers with over 50 million reviews. We're featuring millions of their reader ratings on our book pages to help you find your new favourite book. Close X