Introduction p. 1 JFC Architecture p. 5 Introduction to JFC p. 7 The JFC 1.2 Extension p. 8 Swing p. 9 Drag and Drop p. 16 Accessibility p. 17 MVC Architecture p. 19 The MVC Architecture p. 20 Combined View and Control in JFC p. 21 Factory Design Pattern p. 25 Singleton Pattern p. 31 JComponent p. 35 Top of the JFC Visual Component Hierarchy p. 36 Client Properties p. 37 ToolTip Support p. 38 Border Property p. 39 Size Preferences p. 41 Keystroke Handling p. 41 Scrolling Support p. 46 Focus Transversal Support p. 46 Property Listener Support p. 48 Pluggable Look-and-Feel Support p. 50 Miscellaneous Features p. 51 JFC Programming Techniques p. 55 Thread Safety Requirements of JFC p. 56 The Repaint Manager p. 59 Actions p. 64 JFC Components p. 73 Basic Components p. 75 Separator p. 76 Borders p. 76 Icons p. 106 Label Components p. 110 The Button Hierarchy p. 121 The ButtonModel Interface p. 122 JFC Button Hierarchy p. 128 Simple Buttons: The JButton Class p. 131 Using Actions with Buttons p. 136 JToggleButton p. 141 Check Boxes p. 145
Radio Buttons p. 147 Text Components p. 153 The JTextField Class p. 154 The JPasswordField Class p. 157 The JTextArea Class p. 160 Document Model p. 164 The JEditorPane Class p. 173 Frame Windows p. 189 The JFrame Class p. 190 JApplet p. 206 The JWindow Class p. 208 Menus and Toolbars p. 215 Creating Menus p. 216 Types of Menu Items p. 228 Placing Menus p. 247 Creating Toolbars p. 261 JList, JComboBox, and Bound Controls p. 267 Rubber Stamp Drawing p. 268 Using the JList Class p. 272 Combo Boxes p. 288 Bounded Components p. 299 The JSlider Control p. 304 Tree Component p. 321 Using the JTree Component p. 322 The swing, tree Package p. 327 Table Component p. 359 Table Elements p. 360 A Simple Table p. 361 Table Selection Models p. 365 Column Creation and Resizing Modes p. 367 Models and Support Classes Used by the JTable Class p. 369 Scrolling a Table p. 406 Container Components p. 409 JPanel and Box Classes p. 411 The JPanel Class p. 412 The Box Class p. 413 The JBox Class p. 427 JTabbedPane Class p. 431 JTabbedPane Class Usage p. 432 Scrolling Components p. 445 The JViewport Class p. 446
The JScrollPane Class p. 449 JComponent Scrolling Support p. 456 Split Pane p. 461 The JSplitPane Class p. 462 Internal Frames p. 483 The JInternalFrame Class p. 484 The JDesktopPane Class p. 490 Integrating JInternalFrame and JDesktopPane Usage p. 493 Dialog Boxes p. 503 JOptionPane p. 505 Common JOptionPane Configuration p. 506 Predefined Dialog Boxes p. 509 Rolling Your Own p. 520 Internal Frame Versions p. 529 Choice Dialog Boxes p. 535 The JFileChooser Class p. 536 The JColorChooser Class p. 557 JDialog p. 571 JDialog Configuration p. 572 JDialog Modality p. 573 Closing Options p. 574 JDialog Class Usage Example p. 574 Progress Monitor p. 587 Using the ProgressMonitor p. 588 Example of ProgressMonitor Usage p. 590 Extending JFC Components p. 595 Extending Existing Components p. 597 The Pluggable Look-and-Feel (.plaf) Architecture p. 598 Creating a Custom Look-and-Feel p. 613 Customizing Existing Look-and-Feels p. 614 Creating a Look-and-Feel p. 635 The Multiplexing Look-And-Feel p. 675 Building a Custom Component p. 679 Creating a Custom Component p. 680 Advanced JFC Concepts p. 715 ToolTips and Debug Graphics p. 717 ToolTips Basics p. 718 ToolTips Example p. 721 Using Debug Graphics p. 728 Focus Managers p. 735 About Focus and Focus Managers p. 737
How Swing's Default Focus Manager Works p. 737 Managing Focus from Components p. 738 Using the Focus Manager p. 752 Writing a Custom Focus Manager p. 754 Custom Cursors p. 763 Toolkit Methods for Custom Cursors p. 764 Component Methods for Cursors p. 765 Example Using a Custom Cursor p. 765 Overview of CustomCursorDemo Example p. 767 Creating Images for Custom Cursors p. 769 Undo and Redo p. 771 Supporting Basic Undo Operations p. 772 A Basic Undo Example p. 775 Supporting Undo with Swing Text Components p. 783 Keyboard Navigation p. 789 About Accelerators, Mnemonics, and Shortcuts p. 790 Using Mnemonics p. 791 Using Menu Accelerators p. 795 Using Shortcuts (Hot Keys) p. 799 Keyboard Navigation with Action Objects p. 803 Using Mnemonics with Labels p. 807 Pluggable Look-and-Feel p. 809 Overview of Pluggable Look-and-Feel p. 810 Using the UI Manager p. 813 Timers p. 837 Timer Basics p. 838 Example Using Periodic and One-Shot Timers p. 841 Example Illustrating Timer Resolution p. 847 Swing Utilities p. 855 The SwingUtilities Class p. 856 The SwingConstants Class p. 863 Accessibility p. 865 About Accessibility and Assistive Technologies p. 866 Overview of JDK Support for Accessibility p. 867 Supporting Accessibility in JFC Applications p. 869 Supporting Accessibility in Custom Components p. 872 Creating Assistive Technologies p. 881 Drag and Drop p. 883 Overview of JFC Drag and Drop p. 884 Implementing a Drop Target p. 886 Implementing a Drag Source p. 898
Appendixes JFC Class Reference p. 915 The Joys of Object-Oriented Class Libraries p. 916 Developing with OO Class Libraries p. 917 New UI Developments in the JDK 1.1 p. 917 java.awt p. 924 javax.swing p. 1035 com.foley.chart Package Source Code p. 1185 FAxis Class p. 1186 FAxisUI Class p. 1202 FChart Class p. 1209 FChartLayoutManager Class p. 1218 FChartUI Class p. 1221 MetalFAxisUI Class p. 1226 MetalFChartUI Class p. 1230 WindowsFAxisUI Class p. 1231 WindowsFChartUI Class p. 1234 com.foley.utility Source Code p. 1237 AButton.java p. 1238 ActionFocusListener.java p. 1241 AlbumCollectionItem.java p. 1242 AlbumTreeRenderer.java p. 1243 AlbumTypes.java p. 1245 ApplicationFrame.java p. 1245 ApplicationMouseListener.java p. 1250 ColorEditor.java p. 1252 ExitAction.java p. 1259 FPartialEtchedBorder.java p. 1261 ImageLoader.java p. 1263 JavaFileView.java p. 1265 JBox.java p. 1267 MDIFrame.java p. 1268 MetalNonExpandingTreeUI.java p. 1273 NonExpandingTreeUI.java p. 1275 NoOpAction.java p. 1276 OutlandishTheme.java p. 1277 PercentSlider.java p. 1278 PrintAction.java p. 1280 SetJavaLookAndFeelAction.java p. 1282 SetLookAndFeelAction.java p. 1283 SetMotifLookAndFeelAction.java p. 1286
SetWindowsLookAndFeel.java p. 1287 SimpleListCellRenderer.java p. 1288 SliderValuePanel.java p. 1290 SplashWindow.java p. 1292 TableMap.java p. 1294 TableSorter.java p. 1296 TextFilterDocument.java p. 1301 TreeLeafEditor.java p. 1302 TwoStateInterface.java p. 1303 WindowsNonExpandingTreeUI.java p. 1304 Index p. 1307 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.