question: public void keyPressed ( final KeyEvent k ) { if ( k . getKeyCode ( ) == KeyEvent . VK_SPACE ) { } if ( k . getKeyCode ( ) != KeyEvent . VK_SPACE ) { } repaint ( ) ; }
target:  Task to perform when keyboard button is pressed.