Java Reference
In-Depth Information
method:
void itemStateChanged(ItemEvent
e )
KeyEvent
KeyListener
Indicates that a keystroke has occurred in a
component that is capable of accepting
keystrokes. Classes implementing a
KeyListener in order to receive
KeyEvents need to implement the following
methods:
void keyPressed(KeyEvent e)
void keyReleased(KeyEvent e)
v oid keyTyped(KeyEvent e)
MouseEvent
MouseListener/
MouseMotionListener
Indicates that a mouse action occurred in a
component. The MouseEvent is used both for
mouse events (click, enter, exit) and mouse
motion events (moves and drags). The only
difference is where the events are indicated.
Clicks, presses, and releases are received by a
MouseListener consisting of the the following
methods:
void mouseClicked(MouseEvent e)
void mouseEntered(MouseEvent e)
void mouseExited(MouseEvent e)
void mousePressed(MouseEvent e)
void mouseReleased(MouseEvent e)
Classes that are interested in receiving mouse
drags and moves need to implement the
MouseMotionListener and the following
methods:
void mouseDragged(MouseEvent e)
v oid mouseMoved(MouseEvent e)
PaintEvent
None
In contrast to the other events, the paint
event has no corresponding listener or
adapter. The PaintEvent is internally
handled by the event queue when a
component needs to be repainted.
Applications should override the paint/update
methods in order react to repaint events.
TextEvent
TextListener
Indicates that the text of a component has been
changed. Classes implementing a
TextListener in order to receive
TextEvents need to implement the following
method:
void textValueChanged(TextEvent
e )
WindowEvent
WindowListener
Indicates that a window has changed its status.
Classes implementing a WindowListener in
order to receive WindowEvents need to
implement the following methods:
 
 
Search WWH ::




Custom Search