1. The Swing Text Components: Creating Customized Input Fields. The Swing Text Components. The JTextField and JPasswordField Components. The JTextArea Control. JEditorPane and JTextPane. Common Text Component Features. Text Components, Text Wrapping, and Scrolling. Adding Functionality to the Basic Text Components. Text Component Architecture. Storing Document Content. Implementing Text Fields with Input Validation. A Text Field with Look-Ahead. Text Actions and Keyboard Mappings. Summary.
2. Using JTextPane. Documents with Attributes. Attributes, Styles, and Style Contexts. Summary.
3. Text Components with Custom Views. Customized Document Views. How Attributes Are Stored. Views: Rendering the Document and Its Attributes. Highlighting and Highlighters. The Highlighter and HighlightPainter Interfaces. The LayeredHighlighter Class. Creating a Custom Highlighter. Custom Views and Input Fields. The Formatted Text Field. Summary.
4. JEditorPane and the Swing HTML Package. The JEditorPane Control. A Simple HTML Viewer. Initializing a JEditorPane. Content Type and Editor Kit Selection. Loading Document Content. Saving Document Content. The Swing HTML Package. The HTML Document Model. Style Sheets and HTML Views. The HTML Editor Kit. Summary.
5. Bi-Directional Text. Bi-Directional Text. Model Order and Visual Order. Caret Position and the Selection. How Bi-Directional Text Is Handled in the Swing Text Components. Summary.
6. Creating Custom Table Renderers. Table Rendering. Rendering Basics. Implementing a Custom Renderer. Customizing Cells and Rows. Header Rendering. Renderers and Tooltips. Summary.
7. Table Editing. Overview of the Table Editing Mechanism. An Editable Currency Table. The Table Editing Process-How It Works. Selecting an Editor. The TableCellEditor and CellEditor Interfaces. The DefaultCellEditor Class. The Mechanics of the Editing Process. Using Table Editors. A Table with a Combo Box Editor. Including Buttons in a Table. Tabbing Between Editable Cells. Designing the Edit Traversal Mechanism. Implementing a Table with TAB Edit Traversal. Summary.
8. Drag-and-Drop. Drag-and-Drop Overview. The Drag Source. The Drop Target. Data Transfer. Architecture of the Java Drag-and-Drop Subsystem. Drag Source Architecture. Drop Target Architecture. Transferring Data. Implementing a Drop Target. A Simple Drop Target. A Multi-Functional Drop Target. Providing Drag-Under Feedback. Scrolling the Drop Target. Implementing a Drag Source. Implementing the JLabel Drag Source. Creating a Transferable for a JLabel. Using Drag-and-Drop with the JTree Component. The FileTree Component. The Drag Source Implementation. The Drop Target. Summary.
9. The Swing Undo Package. An Undo Example. Text Component Events Revisited. A Simple Way to Handle Undoable Edits. Inside the Undo Package. UndoableEdit and AbstractUndoableEdit. A Simple UndoableEdit Example. Compound Edits. A Compound Edit Example. Compound Edits and the Text Components. The UndoManager Class. Differences Between UndoManager and CompoundEdit. Extending UndoManager. Summary.
Index.