This second edition covers the latest developments in the Java 2 Standard Edition SDK 1.3 and 1.4. We’ve tried to highlight the changes from 1.2 in case you have to work with older releases for compatibility or political reasons.
For brevity’s sake, we refer to Java versions by their SDK version number, describing this or that feature as having been introduced in SDK 1.3 or 1.4. Earlier versions were called Java Development Kits, so in those cases we refer to JDK 1.1 or 1.2.
This new edition incorporated your feedback from the first edition! The first edition was too heavy on the documentation side for many readers. The Javadoc for the Swing packages continues to improve, and more and more people are familiar with the patterns of Java classes and methods. With those two facts in mind, we try to focus on the parts of the API that are interesting and useful rather than just including them because they exist. We added many new examples and improved the existing examples. This book is a true and thorough revision of the first edition, not a mere update.
As a quick reference to some of the changes you’ll find in the 1.3 and 1.4 releases of the SDK, Table P-1 and Table P-2 list any significant changes to components and briefly describe those changes. We detail these changes throughout the book as we discuss the particular components.
Table P-1. Swing changes in the Java 2 SDK 1.3
Component or feature | In chapter | Description of changes or additions |
---|---|---|
| Several new properties were added, including the click count to start editing and the selection path. | |
| Improved general performance and cell rendering.
| |
| A new | |
| You can now remove the Ok and Cancel buttons. A new
property, | |
| Added new | |
| Added new | |
| Several fixes and newly public classes and methods.
Internal frames are now invisible by default, and the default
close operation is now | |
| Added new | |
Text components | Several fixes applied. Several improvements in
general HTML support via the | |
| New | |
| New print methods added: | |
| New class added. | |
Keyboard binding | New keyboard binding mechanism added. New classes,
| |
| New | |
| | |
| Support for titling undocked toolbars added. | |
| Added new | |
| Added new | |
| Added |
Table P-2. Swing changes in the Java 2 SDK 1.4
Component or feature | In chapter | Description of changes or additions |
---|---|---|
| Added support for indeterminate progress bars. | |
| Added new spinner class. | |
| Added new formatted text field class that validates user input. | |
| A new focus model and methodology was introduced. Several of the old-style focus methods and classes were deprecated as of 1.4.1. | |
Drag and Drop | New architecture introduced, and | |
| Now descends from | |
| More control over mnemonic underline location granted. | |
| Added | |
| Added support for modifying the properties of the
| |
| Long titles are now truncated, and the title bar is rendered with a gradient. | |
Text components | Tooltip support was improved. HTML support,
including accessibility in documents, was improved (XHTML is
still not supported). New | |
| New input dialog methods added. | |
| Now properly supports key bindings. | |
| Introduced scrollable tabs for panes with a large number of tabs. Mnemonic support for accessing tabs was also added. | |
| Null roots are now allowed, and first-letter keyboard navigation was added. | |
| Items can now be arranged horizontally, and first-letter keyboard navigation was added. | |
| New constants, | |
| New methods added, including | |
| General support for auditory cues was added. Access to Windows desktop properties was also added. | |
| | |
| New event and listener for mouse wheels added. | |
| Look-and-feel can now supply window decoration. | |
| Now properly overrides | |
| Now supports mouse wheel events. (This support can be turned off.) | |
| New method to return a | |
| New class (and supporting classes) added. |
Get Java Swing, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.