Moving JLabel With Arrow Keys - NetBeans
Java KeyListener methods
public abstract void keyPressed(KeyEvent e);
public abstract void keyReleased(KeyEvent e);
public abstract void keyTyped(KeyEvent e);
getKeyCode() - Returns the integer keyCode associated with the key in this event.
JLabel by default transparent, if you want to change background color
use opaque property.
setOpaque(boolean value)