boolean (final JRadioButton button) { if (button.isEnabled() && button.isVisible()) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(button, true)); button.doClick(); return true; } return false; }