Button: enabled Button.defaultButtonFollowsFocus on Windows, which allows pressing focused button with <kbd>Enter</kbd> key (as in Windows LaF)

This commit is contained in:
Karl Tauber
2019-12-16 18:11:48 +01:00
parent f20803ae57
commit 475b258e4a
4 changed files with 12 additions and 0 deletions

View File

@@ -77,6 +77,9 @@ class ControlBar
EventQueue.invokeLater( () -> {
// update info label because user scale factor may change
updateInfoLabel();
// this is necessary because embedded JOptionPane's "steal" the default button
frame.getRootPane().setDefaultButton( closeButton );
} );
}
} );