In this installment of the Design Techniques column, Bill proposes the "event generator" as a Java idiom. The article provides a background on the concepts of patterns and idioms, describes the observer pattern, and demonstrates the idiomatic way to implement the observer pattern in Java. (3,000 words)
2. Innovative ways to handle events in AWT and JFC
After a brief introduction to traditional event-handling models, Satheesh Donthy describes three alternative ways to connect AWT or JFC event sources with any event targets using five utility classes. Developers trying to develop AWT/JFC-based applets can use the utility classes to create the smallest UI implementation possible. (3,100 words)
JDK 1.1 has introduced a new event-handling paradigm. While generation and handling of AWT events is relatively well-documented by now, the method of creating new event types is still unclear. This tip presents a step-by-step guide to creating and handling new event types. To benefit from this tip, readers should have a good working knowledge of the new AWT event model. (2,250 words)