/** * Called whenever the value of the selection changes. * * @param e the event that characterizes the change. */ @Override public void valueChanged(final ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } // ignore extra messages if (e.getSource() == table.getSelectionModel()) { int i = table.getSelectedRow(); if (i >= 0) { Wrapper w = model.getWrapperAt(i); w.print = !w.print; model.fireTableRowsUpdated(i, i); table.clearSelection(); } } }