Events usually emerge within a Java program through thehandleEvent
method included in the AWTComponent
class.If you look at the
handleEvent
implementation, you will see that it is largely a switching function that directs events to some eleven convenience methods that handle particular kinds of events, such as action, mouseDown, or keyDown. Note, also, that the method simply does areturn false
for all other events. Thus, the normal practice is for a Java program to override thehandleEvent
and convenience methods.