KeyAdapter in Java

0
133
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

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);
}
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here