This class is a trivial implementation of KeyListener; it provides empty bodies for each of the methods of that interface. When you are not interested in all of these methods, it is often easier to subclass KeyAdapter than it is to implement KeyListener from scratch.
public abstract class KeyAdapter extends Object implements KeyListener { // Default Constructor: public KeyAdapter() // Public Instance Methods public void keyPressed(KeyEvent e); // From KeyListener public void keyReleased(KeyEvent e); // From KeyListener public void keyTyped(KeyEvent e); // From KeyListener }
Object->KeyAdapter(KeyListener(EventListener))