I have a JTable and I fill it with an Object[][] array. This array contains boolean and String values, but table does not show checkboxes (just true or false).
My code is:
model =
new DefaultTableModel(pinFin, colNames) {
public Class<?> getColumnClass(int column) {
String type = h.getColumnsType().get(column);
if(type.equals("L") || type.equals("l"))
return Boolean.class;
else
return String.class;
}
};
data_table = new JTable()
{
public boolean isCellEditable(int row, int column) {
return false;
};
};
data_table.setModel(model);
What is wrong?