Event Handling
The applet must be notified of events:
- example: a button is clicked
-
Three objects of interest:
- The event source – the object causing the event (e.g., a button)
- The event - represented by an object
- The listener - our applet — must react in some way
-
Source notifies the listener
- sends message with event object as argument
- Particular message is specified in an interface