KeyAdapter in Java

KeyAdapter in Java
KeyAdapter in Java

KeyAdapter in Java:

KeyAdapter class is an implementation of KeyListener interface containing empty bodies of each methods of the KeyListener interface.
If we do not wish to write every methods of KeyListener interface in our class,KeyAdapter class helps in that aspect.

The structure of KeyAdapter class is defined as:


public abstract class java.awt.event.KeyAdapter extends java.lang.Object 
                                                implements java.awt.event.KeyListener{
//constructor
public KeyAdapter();
//methods
public void keyPressed(KeyEvent e);
public void keyReleased(KeyEvent e);
public void keyTyped(KeyEvent e);
}
 
KeyAdapter in Java KeyAdapter in Java Reviewed by Animesh Chatterjee on January 07, 2019 Rating: 5

No comments:

Powered by Blogger.