JComponent () { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBagConstraints.WEST; gbc.gridy = 0; gbc.gridx = 0; gbc.weightx = 1.0; gbc.weighty = 1.0; gbc.gridwidth = 1; gbc.insets = JBUI.insets(4, 0, 4, 4); String delegatePanelTitle = "replace.inheritance.with.delegation.delegate.members.title"; myMemberSelectionPanel = new MemberSelectionPanel(JavaRefactoringBundle.message(delegatePanelTitle), Collections.emptyList(), null); panel.add(myMemberSelectionPanel, gbc); MyMemberInfoModel memberInfoModel = new InheritanceToDelegationDialog.MyMemberInfoModel(); myMemberSelectionPanel.getTable().setMemberInfoModel(memberInfoModel); myMemberSelectionPanel.getTable().addMemberInfoChangeListener(memberInfoModel); gbc.gridy++; gbc.insets = JBUI.insets(4, 8, 0, 8); gbc.weighty = 0.0; myCbGenerateGetter = new JCheckBox(JavaRefactoringBundle.message("generate.getter.for.delegated.component")); myCbGenerateGetter.setFocusable(false); panel.add(myCbGenerateGetter, gbc); myCbGenerateGetter.setSelected(JavaRefactoringSettings.getInstance().INHERITANCE_TO_DELEGATION_DELEGATE_OTHER); updateTargetClass(); return panel; }