PPT Slide
To write an event handler:
- Have a class that implements one or more of the Listener interfaces.
- Write code for the appropriate event handler specifying the response to the event.
- Then, register your event handler class with the addListener method of the component whose event you want to catch.