if you want the program exits when any key is pressed then...
when keyPressed system exits, right?
i tried this and worked...
if i didn't understand then... please comment again.
Type: Posts; User: wookyoo
if you want the program exits when any key is pressed then...
when keyPressed system exits, right?
i tried this and worked...
if i didn't understand then... please comment again.
Change this method
public void keyPressed(KeyEvent e)
{
if (e.getModifiers() == KeyEvent.KEY_PRESSED)
System.exit(0);
}