JComponent () { JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(8, 0, 4, 0)); final MyTableModel tableModel = new MyTableModel(); myTable = new JBTable(tableModel); myTable.setShowGrid(false); TableColumnModel columnModel = myTable.getColumnModel(); TableColumn checkboxColumn = columnModel.getColumn(CHECK_COLUMN); TableUtil.setupCheckboxColumn(checkboxColumn); checkboxColumn.setCellRenderer(new BooleanTableCellRenderer()); // make SPACE check/uncheck selected rows @NonNls InputMap inputMap = myTable.getInputMap(); inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "enable_disable"); @NonNls final ActionMap actionMap = myTable.getActionMap(); actionMap.put("enable_disable", new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { if (myTable.isEditing()) return; int[] rows = myTable.getSelectedRows(); if (rows.length > 0) { boolean valueToBeSet = false; for (int row : rows) { if (!myChecked[row]) { valueToBeSet = true; break; } } for (int row : rows) { myChecked[row] = valueToBeSet; } tableModel.updateData(); } } }); /*Border titledBorder = IdeBorderFactory.createBoldTitledBorder("Select methods"); Border emptyBorder = BorderFactory.createEmptyBorder(0, 5, 5, 5); Border border = BorderFactory.createCompoundBorder(titledBorder, emptyBorder); panel.setBorder(border);*/ panel.setLayout(new BorderLayout()); JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable); panel.add(scrollPane, BorderLayout.CENTER); ListSelectionListener selectionListener = new ListSelectionListener() { @Override public void valueChanged(final ListSelectionEvent e) { int index = myTable.getSelectionModel().getLeadSelectionIndex(); if (index != -1) { UsageInfo usageInfo = myOverridingMethods.get(index); myUsagePreviewPanel.updateLayout(Collections.singletonList(usageInfo)); } else { myUsagePreviewPanel.updateLayout(null); } } }; myTable.getSelectionModel().addListSelectionListener(selectionListener); final Splitter splitter = new Splitter(true, 0.3f); splitter.setFirstComponent(panel); splitter.setSecondComponent(myUsagePreviewPanel); myUsagePreviewPanel.updateLayout(null); Disposer.register(myDisposable, new Disposable(){ @Override public void dispose() { splitter.dispose(); } }); if (tableModel.getRowCount() != 0) { myTable.getSelectionModel().addSelectionInterval(0,0); } return splitter; }