JComponent () { final JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1.0; gbc.gridwidth = 2; gbc.insets.bottom = JBUIScale.scale(10); panel.add(super.createCenterPanel(), gbc); myCbSearchInComments = new JCheckBox(RefactoringBundle.message("search.in.comments.and.strings"), isSearchInCommentsAndStrings()); myCbSearchTextOccurences = new JCheckBox(RefactoringBundle.message("search.for.text.occurrences"), isSearchForTextOccurrences()); gbc.insets.bottom = 0; gbc.weightx = 0; gbc.gridwidth = 1; gbc.gridy = 1; gbc.gridx = 0; panel.add(myCbSearchInComments, gbc); gbc.gridx = 1; panel.add(myCbSearchTextOccurences, gbc); final ActionListener actionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { setEnabledSearchSettngs(myRbInlineAll.isSelected() || myKeepTheDeclaration != null && myKeepTheDeclaration.isSelected()); } }; myRbInlineThisOnly.addActionListener(actionListener); myRbInlineAll.addActionListener(actionListener); if (myKeepTheDeclaration != null) { myKeepTheDeclaration.addActionListener(actionListener); } setEnabledSearchSettngs(myRbInlineAll.isSelected()); return panel; }