I have a JTable
which has DefaultTableModel
. Now I want to change table column headers and columns data types(eg :- Boolean,String,Object,etc). I try to do as following .
DefaultTableModel model = (DefaultTableModel) list_table.getModel();
list_table.setModel(new javax.swing.table.DefaultTableModel(new Object[][]{}, new String[]{"", "ID", "Name", "Age","Address", "Contact", "Gender", "Civil Status" }));
updateTable();
The " " column object type should be boolean.But I couldn't change object type to a Boolean from this.Also I run this on threaded environment.
Have any ideas .