I've a Jtable in which i'm setting data using setDataVector function.It's working fine but suppose if i have changed some column width simply by dragging using mouse and after that new data loads in the same table then the width of that column reset to it's default position.So basically i want to retain that width even if new data loads.
When you use the setDataVector() method the structure of the table may change so the table automatically recreates the TableColumnModel and you lose your customization.
When you create the JTable the first time use code like:
JTable table = new JTable(...);
table.setAutoCreateColumnsFromModel( false );
to prevent the TableColumnModel from being recreated.