The Container Event Class
A Focus Event is generated when a component gains or loses input focus. These events are identified by the integer constants FOCUS_GAINED and FOCUS_LOST.
Focus Event is a subclass of Component Event and has these constructors: Event(Component int type) Focus Event(Component Flag Here, is a reference to the component that generated this event. The type of the event is specified by type. The argument temporary Flag is set to true if the focus event is temporary. Otherwise, it is set to false. (A temporary focus event occurs as a result of another user operation. For example, assume that the focus is in a text field. If the user moves the mouse to adjust a scroll par, the focus IS temporarily lost. method indicates if this focus change is temporary. Its shown here:
The input Event Class
The abstract class Input Event is a subclass of Component Event and is the super class for-component input events. Its sub classes are Key Event and Mouse Event. Input Event class defines the following eight integer constants that can be used to obtain information about modifiers associated with this event:
The item Event Class
An Item Event is generated when a check box or a list item is clicked or when a 'check able menu item is selected or deselected. (Check boxes and list boxes are described later in this book.) There are two types of item events, which are identified by the following integer constants.
The Key Event Class
A Key Evcnt is generated when keyboard input occurs. There are three types of key events, which are identified by these integer constants: KEY_PRESSED, KEY_RELEASED, and KEY_TYPED. The first two events arc generated when key is..pressed or released. The last event occurs only when a character is generated. Remember, not all key presses result in characters. For example, pressing the SHIFT key does not generate a character.