Home > Store

Core Swing: Advanced Programming

Register your product to gain access to bonus material or receive a coupon.

Core Swing: Advanced Programming

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2000
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-083292-8
  • ISBN-13: 978-0-13-083292-4


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:

  • DEMONSTRATES how to write commercial quality code
  • FEATURES dozens of nontrivial programs and examples—no toy code!
  • FOCUSES on the features and functions most important to real developers
  • PROVIDES objective, unbiased coverage of cutting-edge technologies—no hype!

Core Swing: Advanced Programming delivers:

  • State-of-the-art insights into the Swing classes that other books can't touch
  • Practical techniques for building the Swing components you really need
  • Fast-track techniques for making the most of text controls, editors, tables, and drag-and-drop
  • Hundreds of professional-level code examples

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.

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130832928.pdf

Table of Contents



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.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.