Let the user change the column order in Java/Swing

Do you have the requirement to let the user of your application change the order of his columns and your app is based on Swing? Then you should read further. Below you find a [TableColumnModel](http://download.oracle.com/javase/1.4.2/docs/api/javax/swing/table/TableColumnModel.html) that has two states: STANDARD and USERDEFINED. In the STANDARD state the user may not change the order of the columns by drag’n’drop, in USERDEFINED he may. The good thing: If you toogle the state the column order is restored....

November 18, 2011 · 2 min · admin