I have a JTable
where two columns are Boolean
and I use this method to recognize the type of data:
public Class getColumnClass(int column){
if ((getValueAt(0, column)) == null){
return super.getColumnClass(column);
}
The data is shown perfectly like a CheckBox
, but the background is white, unlike the rest of the columns:
Just let me know if you need some more code. **I'm using the NimbusLookAndFeels
(don't know if it really matters)
Thanks in advance
EDIT: I found already an answer for my question in this post:
JTable - Boolean Cell Type - Background
I don't know how I can set it like duplicate question