I have a table which contains number of columns. I added a column of CheckBox components by createCell method. that added column should be the first column (the column of index 0).
My problem simply when I run the code the that previously first column (Student-Number) is not displayed . It seems to me the added column covered the next column.
How to solve this problem please?
TableModel model = new DefaultTableModel( new String[] {"Student-Number","Student-name","Degree"} ,ob) {
public boolean isCellEditable(int row, int col)
{
return true;
}
};
Table table = new Table(model,true)
{
protected Component createCell(Object value, final int row,
final int column, boolean editable) {
if (column == 0)
{
CheckBox cod= new CheckBox ("cod");
return cod;
}
return super.createCell(value, row, column, editable);
}
} ;