Register your product to gain access to bonus material or receive a coupon.
8329B-3
The experienced developer's guide to the Swing classes!
Core Swing helps you deliver the sophisticated Java GUI applications your users demand—with Java Swing techniques that start where other books leave off! Building on his bestseller Core Java Foundation Classes, Kim Topley takes on the toughest Swing issues raised by programmers throughout the Java community and addresses crucial topics first-generation Swing books completely missed.
With Core Swing, you'll discover how to exploit the Swing tree and table controls to the fullest, customize and create your own text fields with features that sophisticated users expect, build your own editors and file viewers, and much more. There is complete and in-depth coverage of Swing's HTML support, a topic barely addressed in other Swing books. You'll also find detailed coverage of undo/redo and drag-and-drop, with lengthy, fully documented code examples, in the book and on the accompanying CD-ROM.
Every Core Series book:
Core Swing: Advanced Programming delivers:
CD-ROM
The accompanying CD-ROM includes all of the book's detailed code examples a bonus chapter taken from Kim Topley's first book, Core Java Foundation Classes, and trial versions of SwingBuilder from SwingSoft and Netbeans.
Click here for a sample chapter for this book: 0130832928.pdf
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.
Documents with Attributes. Attributes, Styles, and Style Contexts. Summary.
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.
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.
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.
Table Rendering. Rendering Basics. Implementing a Custom Renderer. Customizing Cells and Rows. Header Rendering. Renderers and Tooltips. Summary.
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.
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.
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.