Java Swing Utilities

Welcome to the utility section for Java Swing, 2nd Edition. You can download the various supplemental chapters in PDF format as well as find utilities such as the Every Event Listener mentioned in the book.

 

 

Classic Key Events

Key event handling information for pre-1.3 SDKs. This is information that was removed from the first edition but could still be useful to anyone developing on the 1.2 SDK.

ClassicKeyEvents.pdf (12K)
 

HTML Editor Kits

We created two entirely new chapters for the 1.3 release of the SDK and its improved HTML support. As we completed the second edition (with the 1.4 SDK and its further improvements) we felt these chapters did not fit the tone or primary purpose of the book.

If you are developing your own editor kit, though, you will find many parts of these online chapters quite useful.

This is the first of three related downloads. This chapter covers the basic use of the editor kit HTML. The HTML I/O chapter covers the parsing and writing of HTML content. The Editor Kit code examples include the source code from both chapters.

HtmlEdKit.pdf (688K)
 

HTML I/O

The reading, parsing, and writing of HTML content using the editor kit interface. This chapter also discusses use of the MinimalHTMLWriter class for quick output in HTML.

HtmlIO.pdf (599K)
 

HTML Editor Kit code examples

The source code and support files (icons, text files, etc.) for the HTML Editor Kit and I/O chapters.

html_ex.zip (42K)
 

Every Event Listener

The EEL utility is a quick debugging aid that can listen for any type of event and log basic information about the event to various output devices.

eel.zip (12K)
 

Mac LnF Metal Theme

A Metal theme that includes components sized to match their counterparts in the Mac look-and-feel. While this theme does not create applications that look like Mac applications, it gives developers a clean and easy method for verifying their graphical layouts will display properly on Mac systems that use the native LnF rather than Metal.

Special thanks to Lee Ann Rucker for developing this theme and for granting us permission to post it here.

(See Chapter 26 in the book for details on using this jar file and the MacMetrics theme.)

MacMetrics.jar (24K)
 
Mapper.java utility
Mapper.java
 

Everything

The whole ball of supplemental wax. Each of the utilities and chapters mentioned above and this web page.

all.zip (1.3M)

Related Articles

Besure to also check out the following ONJava articles related to Swing:

  • SpringLayout is a new layout manager available in the 1.4 SDK. Marc Loy covers it in detail in this article.
  • RelativeLayout is a custom layout manager written by Jim Elliott to address the needs of developers looking to build flexible yet reasonably interesting layouts.
    • Part I covers setting up and using the layout manager.
    • Part II explores its architecture, source code and XML binding.