How should a JFrame be closed without a mouse?
The window manager typically uses Alt-F4, but do note that that means the WM will kill the JFrame, which typically means a method is called that registeres such a change.
Most styleguides I know of also ask the application to implement ctrl-q (apple-q) which does a destroy, and other cleanup.
Note that a JFrame does not imply any context so you don't know if it is a document, help window or even a status window so ctrl-w (for closing the document) or even obscure keycombinations like tabbing to a 'close' button are possible.
A low tech solution is to have a 'Done' button with a mnemonic on it.
By calling the hide() or the dispose() method.
User not developer.
Try Alt + F4
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.