DISQUS

DISQUS Hello! LegHumped is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

LegHumped

Coding, snippets, tutorials and procrastinations
Jump to original thread »
Author

Java: Close a JFrame with Escape

Started by HJennerway · 10 months ago

This will close a JFrame when the escape key is pressed. The actionPerformed method can do be used to call another method or to close the frame which called it.

KeyStroke escapeKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
Action escapeAction %3 ... Continue reading »

0 comments

This thread has no comments yet.

Add New Comment

Returning? Login