/** * Gets the default action. Default action will be trigger when ENTER key is pressed. * * @return the default action. */ public Action getDefaultAction() { return _standardDialogPane.getDefaultAction(); }
if (getDefaultAction() != null) { getRootPane().registerKeyboardAction(getDefaultAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);