JScrollPane () { myTableModel = new MyTableModel(); myTable = new JBTable(myTableModel); myTable.setSurrendersFocusOnKeystroke(true); myTable.getTableHeader().setReorderingAllowed(false); final TableColumnModel columnModel = myTable.getColumnModel(); columnModel.getColumn(SKIP_SETTER).setCellRenderer(new BooleanTableCellRenderer()); myTable.registerKeyboardAction( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final int[] selectedRows = myTable.getSelectedRows(); for (final int selectedRow : selectedRows) { final ParameterData parameterData = myTableModel.getParamData(selectedRow); if (parameterData.getDefaultValue() != null) { parameterData.setInsertSetter(!parameterData.isInsertSetter()); } } TableUtil.selectRows(myTable, selectedRows); } }, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), JComponent.WHEN_FOCUSED ); myTable.setPreferredScrollableViewportSize(JBUI.size(550, -1)); myTable.setVisibleRowCount(12); myTable.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); return ScrollPaneFactory.createScrollPane(myTable); }