void () { final TableColumn checkboxColumn = myTable.getColumnModel().getColumn(ProjectStartupTasksTableModel.IS_SHARED_COLUMN); final String header = checkboxColumn.getHeaderValue().toString(); final FontMetrics fm = myTable.getFontMetrics(myTable.getTableHeader().getFont()); final int width = - new JBCheckBox().getPreferredSize().width + fm.stringWidth(header + "ww"); TableUtil.setupCheckboxColumn(checkboxColumn, width); checkboxColumn.setCellRenderer(new BooleanTableCellRenderer()); myTable.getTableHeader().setResizingAllowed(false); myTable.getTableHeader().setReorderingAllowed(false); final TableColumn nameColumn = myTable.getColumnModel().getColumn(ProjectStartupTasksTableModel.NAME_COLUMN); nameColumn.setCellRenderer(new ColoredTableCellRenderer() { @Override protected void customizeCellRenderer(@NotNull JTable table, @Nullable Object value, boolean selected, boolean hasFocus, int row, int column) { final RunnerAndConfigurationSettings settings = myModel.getAllConfigurations().get(row); setIcon(settings.getConfiguration().getIcon()); append(settings.getName()); } }); }