Close the client's dialogs with Escape
Only the option-pane prompts closed on Escape, because Swing installs that binding on the option pane itself. Dialogs.closeOnEscape puts the same window-wide binding on a dialog's root pane, routed to whatever that dialog does when its Close or Cancel button is pressed — reverting the live-previewing settings, or flushing the bookmark being edited. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,7 @@ public final class ConnectionInfoDialog extends JDialog {
|
||||
content.add(buildButtons(), BorderLayout.SOUTH);
|
||||
setContentPane(content);
|
||||
|
||||
Dialogs.closeOnEscape(this);
|
||||
pack();
|
||||
setLocationRelativeTo(owner);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user