Column order change in JTable

Column order change in JTable

Post by Ike » Wed, 12 Nov 2003 06:07:59


If I have two JTables, jtableA and jtableB, and I want the order of the
columns in jtableB to be the same as in jtableA when a user rearranges the
order of the columns in jTableA (or, resizes even), how can I implement
this? Thanks, Ike
 
 
 

Column order change in JTable

Post by ak » Wed, 12 Nov 2003 06:38:43

you may override method columnMoved(TableColumnModelEvent e) of jtableA
(dont forget to call super.columnMoved(e))
and then call moveColumn(e.getFromIndex(), e.getToIndex()) of jtableB


"Ike" < XXXX@XXXXX.COM > schrieb im Newsbeitrag