I have a JTable built using DefaultModel which is displayed in JPane but I would like to re-size the table to make it bigger. Could any one please explain how I could do that? I have tried the following code:
TableColumnModel colsize = t1.getColumnModel();
for(int i=0; i<cols; i++){
colsize.getColumn(i).setPreferredWidth(200);
}
but it did not work.