void () { TableColumnModel columnModel = myEntryTable.getColumnModel(); TableColumn checkboxColumn = columnModel.getColumn(getCheckboxColumn()); if (myCheckboxColumnName.isEmpty()) { TableUtil.setupCheckboxColumn(checkboxColumn, columnModel.getColumnMargin()); } else { int width = myEntryTable.getFontMetrics(myEntryTable.getFont()) .stringWidth(" " + myCheckboxColumnName + " ") + 4; checkboxColumn.setWidth(width); checkboxColumn.setPreferredWidth(width); checkboxColumn.setMaxWidth(width); checkboxColumn.setMinWidth(width); } }