posted 23 years ago
I know how you can fix the column problem. Basically, the first time you update the table the column widths are adjusted correctly, but any subsequent update to the table resizes the columns to the uncorrect width, right?
So, here's what you do:
after you update your table model with new data, immediately do the following...
for( int i = 0; i < table.getColumnCount(); i++)
table.sizeColumnsToFit( i);
You may have to initialize your table with a call to the following...
table.setAutoResizeMode( JTable.AUTO_RESIZE_ALL_COLUMNS);
Let me know if that works, email me, I dont check this board much anymore
SAF