JPanel () { myDoNotReplaceRadioButton = new JBRadioButton(UIUtil.replaceMnemonicAmpersand( GroovyBundle.message("introduce.parameter.do.not.replace.option.label") )); myReplaceFieldsInaccessibleInRadioButton = new JBRadioButton(UIUtil.replaceMnemonicAmpersand( GroovyBundle.message("introduce.parameter.replace.inaccessible.fields.option.label") )); myReplaceAllFieldsRadioButton = new JBRadioButton(UIUtil.replaceMnemonicAmpersand( GroovyBundle.message("introduce.parameter.replace.all.fields.option.label") )); myDoNotReplaceRadioButton.setFocusable(false); myReplaceFieldsInaccessibleInRadioButton.setFocusable(false); myReplaceAllFieldsRadioButton.setFocusable(false); final ButtonGroup group = new ButtonGroup(); group.add(myDoNotReplaceRadioButton); group.add(myReplaceFieldsInaccessibleInRadioButton); group.add(myReplaceAllFieldsRadioButton); final JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(myDoNotReplaceRadioButton); panel.add(myReplaceFieldsInaccessibleInRadioButton); panel.add(myReplaceAllFieldsRadioButton); panel.setBorder(IdeBorderFactory.createTitledBorder(GroovyBundle.message("introduce.parameter.replace.fields.border.title"))); return panel; }