1 | Every event has a source object, obtained by getSource(), and a type value, obtained by getID(). In the case of buttons, the ID is ACTION_PERFORMED. Other Events may have more than one type of event ID. |
2 | Event subclasses also have methods for whatever data is needed to handle the event. For example, ActionEvent has a method paramString() which for buttons, returns the string labelling the button. MouseEvent has methods getX() and getY(), which return the x and y pixel location of the mouse, and getClickCount(). |
3 | AWTEvent |
4 | ActionEvent |
5 | InputEvent |
6 | Adjustment |
7 | Event |
8 | ItemEvent |
9 | ComponentEvent |
10 | MouseEvent |
11 | KeyEvent |
12 | . . . |