JComponent () { final Splitter splitter = new Splitter(true); splitter.setFirstComponent(createTablePanel()); splitter.setSecondComponent(myWholePanel); final ActionListener enableDisableListener = new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { setEnabled(myCreateBuilderClassRadioButton.isSelected()); IdeFocusManager.getInstance(myProject).requestFocus( myCreateBuilderClassRadioButton.isSelected() ? myNewClassName : myExistentClassTF.getChildComponent(), true); validateButtons(); } }; myCreateBuilderClassRadioButton.addActionListener(enableDisableListener); myExistingBuilderClassRadioButton.addActionListener(enableDisableListener); myCreateBuilderClassRadioButton.setSelected(true); setEnabled(true); final DocumentAdapter validateButtonsListener = new DocumentAdapter() { @Override protected void textChanged(@NotNull DocumentEvent e) { validateButtons(); } }; myNewClassName.getDocument().addDocumentListener(validateButtonsListener); final PsiClass psiClass = myConstructors[0].getContainingClass(); LOG.assertTrue(psiClass != null); @NlsSafe String builderDefaultName = psiClass.getName() + "Builder"; myNewClassName.setText(builderDefaultName); return splitter; }