Possible Duplicate:
Java Full Screen Program (Swing) -Tab/ALT F4
I’ve got a full screen frame running and I wish to emulate a Kiosk environment. To do this, I need to “catch” all occurrences of Alt–F4 and Alt–Tab pressed on the keyboard at all times. Is this even possible? My pseudocode:
public void keyPressed(KeyEvent e) {
//get the keystrokes
//stop the closing or switching of the window/application
}
I’m not sure if keyPressed and it’s associates (keyReleased and keyTyped) are the right way to go because from what I’ve read, they only handle single keys/chars.
To stop Alt-F4:
To stop Alt-Tab, you can make something more aggressive.