Replace 1.1 event adapters to build better apps

Sophisticated event adapters can replace JDK 1.1's adapters, improving your applications

Page 3 of 3

This is a lot of work, and it scales poorly due to the cutting-and-pasting necessary for each AWT GUI component. Third party components must be subclassed too, which adds even more work. It will often be simpler to require a JDK 1.1 environment instead of trying to make this work under JDK 1.0.


The standard adapter classes provided by the JDK are simple, but do not provide the functionality required by even moderately sophisticated Java applications; they allow for too many silent failures, provide no help in keeping the GUI responsive, and do not allow an application's exception-handling policy to be easily changed.

In contrast, this article's sophisticated adapter classes, which address the shortcomings of the JDK 1.1's adapters, can help produce more robust and responsive applications. Nevertheless, the presented adapter classes are not the correct solution for all applications. Each application development team must decide whether these classes provide not enough functionality, enough, or too much. Someone still has to think.

Mark is JavaWorld's Java Tip technical coordinator. He has been programming professionally since 1989 and has been using Java since the alpha-3 release. He works full time at KLA-Tencor and is part of a team building a huge, distributed, parallel, multicomputer application for image processing (among other things) that is written almost entirely in Java.

Learn more about this topic

| 1 2 3 Page 3