KeyListener

Name

KeyListener

[Graphic: Figure from the text]

Description

Objects that implement the KeyListener interface can receive KeyEvent objects. Listeners must first register themselves with objects that produce events. When events occur, they are then automatically propagated to all registered listeners.

Interface Definition

public abstract interface java.awt.event.KeyListener extends java.util.EventListener {
 // Instance Methods public abstract void keyPressed (KeyEvent e);
public abstract void keyReleased (KeyEvent e);
public abstract void keyTyped (KeyEvent e);
}

Interface Methods

keyPressed

public abstract void keyPressed (KeyEvent e)

keyReleased

public abstract void keyReleased (KeyEvent e)

keyTyped

public abstract void keyTyped (KeyEvent e)

See Also

AWTEventMulticaster, EventListener, KeyEvent, KeyListener