package java.awt.event :
The package java.awt.event defines various categories of events which are produced through several user interface elements. A Most important event class is given in the display table.
Table: Main Event Classes in java.awt.event
Event Class Description
ActionEvent Produced when a button is pressed, a list item is Double- clicked, or a menu item is selected.
AdjustmentEvent Produced when a scroll bar is manipulated.
ComponentEvent Produced when a component is hidden, moved, resized, or becomes visible.
ContainerEvent Produced when a component is added to or removed from a container.
FocusEvent Produced when a component gains or loses keyboard focus.
InputEvent Abstract super class for all component input event classes
ItemEvent Produced when a checkbox or list item is clicked; also occurs when a choice selection is made or a checkable menu item is selected or deselected.
KeyEvent Produced when input is received from the keyboard.
MouseEvent Produced when the mouse is dragged, moved, clicked, pressed, or released; also generated when the mouse enters or exits a component.
TextEvent Produced when the value of a text area or text area or text field is changed.
WindowEvent Produced when a window is acivated, close, deacivated, deiconified, iconified, opened, or quit.
Updates to the spreadsheet applet are driven through the occurrence of user events, like as keypresses and mouse button clicks. As elaborated events are commonly handled along with either the action () method or the handleEvent() method. An action () method of the components class is the preferred way to handle a limited number of events. A handleEvent method of the Event class is the perferred way to handle complex series or multiple of events.
Whenever an applet has only a few possible events which deal along with the mouse or keypresses, you could call more direct methods which eliminate the necessary of nested if or case statements to check event type. Those methods, such as the action () method, that are members of the component class.