void () { UIUtil.setEnabled(myExistingClassPanel, useExistingClassButton.isSelected(), true); UIUtil.setEnabled(myNewClassPanel, createNewClassButton.isSelected(), true); UIUtil.setEnabled(myCreateInnerPanel, myCreateInnerClassButton.isSelected(), true); final IdeFocusManager focusManager = IdeFocusManager.getInstance(myProject); if (useExistingClassButton.isSelected()) { focusManager.requestFocus(existingClassField, true); } else if (myCreateInnerClassButton.isSelected()) { focusManager.requestFocus(myInnerClassNameTextField, true); } else { focusManager.requestFocus(classNameField, true); } validateButtons(); }