JTable:更改 JCheckBox 的状态

JTable: change the status of a JCheckBox

我有一个 JTable 和一个包含布尔对象的列,所以它在 table 中的视图是一个 JCheckBox。我想更改 JCheckBox 的状态以更改模型中的数据。我设

@Override
public boolean isCellEditable(int i, int y) {
   return true;
}

但它不起作用。谁能帮帮我?

如果您查看 TableModel,您会注意到方法 setValueAt(...)。当您单击 table 中的复选框时,此更改将传播到此处。