I can’t resist with the @jzd advice really not, I think not, I can’t guarantee that I will go through t TableMode#setValue ,
but basically there are two options
1) TableModelListener
2) Only AFAIK TableCellEditor # isCellEditable can do this in conjunction with JCheckBox or JRadioButton in JTable
public boolean isCellEditable(EventObject getEvent) { MouseEvent me = (MouseEvent) getEvent; JTable table = (JTable) (me.getSource()); Point point = me.getPoint(); int column = table.columnAtPoint(point); int row = table.rowAtPoint(point); Rectangle rec = table.getCellRect(row, column, true);
source share