void (ActionEvent e) { if (getCheckboxColumn() == -1) return; int[] selectedRows = myEntryTable.getSelectedRows(); boolean currentlyMarked = true; for (int selectedRow : selectedRows) { if (selectedRow < 0 || !myEntryTable.isCellEditable(selectedRow, getCheckboxColumn())) { return; } currentlyMarked &= ((Boolean)myEntryTable.getValueAt(selectedRow, getCheckboxColumn())).booleanValue(); } for (int selectedRow : selectedRows) { myEntryTable.setValueAt(currentlyMarked ? Boolean.FALSE : Boolean.TRUE, selectedRow, getCheckboxColumn()); } }