Java AWT all events in a table
Event Listener Interface Listener Method Syntax When it Generates
ActionEvent ActionListener public void actionPerformed(ActionEvent e) Generated when a button, menu item,
or other components are activated.
MouseEvent MouseListener, public void mouseClicked(MouseEvent e) Generated on mouse actions such as
MouseMotionListener public void mousePressed(MouseEvent e) click, press, release, enter, exit, drag,
public void mouseReleased(MouseEvent e) and move.
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void mouseDragged(MouseEvent e)
public void mouseMoved(MouseEvent e)
KeyEvent KeyListener public void keyTyped(KeyEvent e) Generated when a key is typed,
public void keyPressed(KeyEvent e) pressed, or released.
public void keyReleased(KeyEvent e)
FocusEvent FocusListener public void focusGained(FocusEvent e) Generated when a component gains
public void focusLost(FocusEvent e) or loses keyboard focus.
To Join Programming classes, Call / WhatsApp NR Classes LLP on 9730381255
WindowEvent WindowListener public void windowOpened(WindowEvent e) Generated when a window is opened,
public void windowClosing(WindowEvent e) closed, minimized, maximized,
public void windowClosed(WindowEvent e) activated, or deactivated.
public void windowIconified(WindowEvent e)
public void windowDeiconified(WindowEvent e)
public void windowActivated(WindowEvent e)
public void windowDeactivated(WindowEvent e)
ComponentEvent ComponentListener public void componentResized(ComponentEvent e) Generated when a component is
public void componentMoved(ComponentEvent e) resized, moved, shown, or hidden.
public void componentShown(ComponentEvent e)
public void componentHidden(ComponentEvent e)
ItemEvent ItemListener public void itemStateChanged(ItemEvent e) Generated when the state of an item
changes (e.g., checkbox or combo
box selection).
ChangeEvent ChangeListener public void stateChanged(ChangeEvent e) Generated when the state of a
component changes, such as a slider
or progress bar.
AdjustmentEvent AdjustmentListener public void Generated when an adjustment (scroll
adjustmentValueChanged(AdjustmentEvent e) bar movement) occurs.
TextEvent TextListener public void textValueChanged(TextEvent e) Generated when the value of a text
component changes (e.g., in a
TextField).
To Join Programming classes, Call / WhatsApp NR Classes LLP on 9730381255