JComponent () { final Box box = Box.createVerticalBox(); setupTable(); myTableModel.addTableModelListener(e -> handleChanges()); TableUtil.setupCheckboxColumn(myTable, CHECK_COLUMN); setupOldNameColumn(); setupNewNameColumn(); myValidatingComponent = new ValidatingComponent<JComponent>() { @Override protected JComponent createMainComponent() { return ScrollPaneFactory.createScrollPane(myTable); } }; myValidatingComponent.doInitialize(); box.add(myValidatingComponent); final Box buttonBox = Box.createHorizontalBox(); buttonBox.add(Box.createHorizontalGlue()); final JButton selectAllButton = new JButton(RefactoringBundle.message("select.all.button")); buttonBox.add(selectAllButton); buttonBox.add(Box.createHorizontalStrut(4)); final JButton deselectAllButton = new JButton(RefactoringBundle.message("unselect.all.button")); buttonBox.add(deselectAllButton); selectAllButton.addActionListener(e -> { for (int i = 0; i < getElementCount(); i++) { myShouldRename[i] = true; } myTableModel.fireTableDataChanged(); }); deselectAllButton.addActionListener(e -> { for (int i = 0; i < getElementCount(); i++) { myShouldRename[i] = false; } myTableModel.fireTableDataChanged(); }); box.add(Box.createVerticalStrut(4)); box.add(buttonBox); box.add(Box.createVerticalStrut(4)); return box; }