You are on page 1of 1

Event Handling in AWT (Abstract Window Toolkit)

Event Listener Interface <Type>Listener

Event Class <Type>Event ActionEvent AdjustmentEvent

Method Of Listener Interface

Frequently Used Components With This Event

Button,Menu,MenuItem,MenuBar public void actionPerformed (ActionEvent e) public void adjustmentValueChanged (AdjustmentEvent e) ScrollBar, ScrollPene. public void componentHidden (ComponentEvent e) public void componentMoved (ComponentEvent e) ComponentListener ComponentEvent public void componentResized (ComponentEvent e) Panel, Frame, Window. public void componentShown (ComponentEvent e) public void containerAdded (ContainerEvent e) ContainerListener ContainerEvent public void containerRemoved (ContainerEvent e) public void focusGained (FocusEvent e) FocusListener FocusEvent Most Of The Components public void focusLost (FocusEvent e) ItemListener ItemEvent public void itemStateChanged (ItemEvent e) CheckBox, List, Choice. public void keyPressed (KeyEvent e) TextArea, TextField, Button, KeyListener KeyEvent public void keyReleased (KeyEvent e) MenuBar, MenuItem. public void keyTyped (KeyEvent e) public void mouseClicked (MouseEvent e) public void mouseEntered (MouseEvent e) MouseListener MouseEvent public void mouseExited (MouseEvent e) Any Component. public void mousePressed (MouseEvent e) public void mouseReleased (MouseEvent e) public void mouseDragged (MouseMotionEvent e) MouseMotionListener MouseMotionEvent public void mouseMoved (MouseMotionEvent e) TextListener TextEvent public void textValueChanged (TextEvent e) TextArea, TextField. public void windowActivated (WindowEvent e) public void windowOpened (WindowEvent e) public void windowClosed (WindowEvent e) WindowListener WindowEvent Window, Frame. public void windowClosing (WindowEvent e) public void windowDeactivated (WindowEvent e) public void windowIconified (WindowEvent e) public void windowDeiconified (WindowEvent e) Common method to Register any Event Handeling Component : public void add<Type>Listener(<Type>Listener l)

ActionListener AdjustmentListener

You might also like