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.
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 ...
Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.