AWT Event Handling
- Component method
postEvent() will send an event to the
Component (the toolkit
does this for you).
- Component method
handleEvent() will handle it. This can be overridden.
- Component's
handleEvent() classifies event and calls appropriate method -
action(), keyDown(), keyUp(), mouseDown(), ..., gotFocus(), lostFocus()
- If
handleEvent() returns false, then the parent's
handleEvent() is called.
- If no Component returns true from
handleEvent() then the Peer method is
called (bizarre!!)
Slide 39