In the new event model, events are generated by event sources . One or more listeners can register to be notified about events of a particular kind from a particular source. Sometimes this model is called delegation , since it allows the programmer to delegate authority for event handling to any object that implements the appropriate listener interface. The new AWT event model lets you both handle and generate AWT events.
Event handlers can be instances of any class.
As long as a class implements an event listener interface, its instances can handle events. The implementation of the methods in the listener interface. Here is a bare-bones 1.1 applet that illustrates event handling. It contains a single button that beeps when you click it. The above applet requires JDK 1.1.