O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Component Events

As evidenced by Figure 9-4, there are two types of AWT events: component events, which extend ComponentEvent, and semantic events, which extend AWTEvent. Table 9-5 lists the classes representing the two types of events.

Table 9-5. AWT Event Classes (all classes are from the java.awt.event package)
Semantic Events Component Events
ActionEvent ComponentEvent
AdjustmentEvent ContainerEvent
ItemEvent FocusEvent
TextEvent InputEvent
 KeyEvent
 MouseEvent
 MouseMotionEvent
 WindowEvent

Component events are fired when something specific happens to a component, for example: the mouse enters/exits the component or is pressed within it; the component gains or loses keyboard focus; the component is a window that is closing, etc. Component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required