Thanks,
I created a JTable which has a column which can be "true" or "false". I found
sample code where I extend DefaultTableModel overriding getColumnClass() so that
this column now has checkboxes. Mouse clicks over checkboxes work fine. How
can I programmatically make the checkbox checked or unchecked.
fc
hiwa - 22 Oct 2006 23:53 GMT
:-o wrote:
> Thanks,
[quoted text clipped - 5 lines]
>
> fc
You manipulate the model. Set the desired model data to true or false.
If you use DefaultTableModel method for that, view update should be
done automatically.
Thomas Fritsch - 23 Oct 2006 00:54 GMT
> I created a JTable which has a column which can be "true" or "false". I
> found
[quoted text clipped - 3 lines]
> How
> can I programmatically make the checkbox checked or unchecked.
You can call the method
public void setValueAt(Object value, int row, int column)
of your JTable or of its TableModel with a Boolean object as value.

Signature
Thomas