Previous | Next | Trail Map | To 1.1 -- And Beyond! | GUI Changes: The AWT Grows Up


The New AWT Event Model

As of JDK 1.1, the AWT has a new event model. The old, containment-based model(in the Creating a User Interface trail) still works, but its use is discouraged because the new model is so much more flexible, powerful, and efficient. The new model is based on the JavaBeans(in the JavaBeans trail) event model, as one step toward supporting AWT components as beans.

Introduction to the New AWT Event Model

This section explains the new event model and contains a few illustrative applets.

Using Adapters and Inner Classes to Handle AWT Events

To reduce unnecessary code, you can use adapters and inner classes. This section shows how and when to do so.

Handling Standard AWT Events

This section lists all the events AWT components can generate. It will give examples of handling them.

Generating AWT Events

Your objects can generate both standard and custom AWT events. This section will tell you how. For now, see Lightweight Components for examples of generating AWT events. See JDK 1.1 Event Examples for an example of one way of redispatching an AWT event.

Summary of the AWT Event Model

This section will tie everything together, summarizing what you've learned and providing some additional details.


Previous | Next | Trail Map | To 1.1 -- And Beyond! | GUI Changes: The AWT Grows Up