Java Reference
In-Depth Information
Table 15-3 Commonly Used Event Listener Interfaces
Using the Delegation Event Model
Now that you have had an overview of the delegation event model and its various compon-
ents, it is time to see it in practice. Applet programming using the delegation event model
is actually quite easy. Just follow these two steps:
1. Implement the appropriate interface in the listener so that it will receive the type of
event desired.
2. Implement code to register and unregister (if necessary) the listener as a recipient for
the event notifications.
Remember that a source may generate several types of events. Each event must be re-
gistered separately. Also, an object may register to receive several types of events, but it
must implement all of the interfaces that are required to receive these events.
 
Search WWH ::




Custom Search