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 that has
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.

Just a hint: If you want to store the column order, first get it by calling getColumnMap().

Before you ask you to use it. Try setModel of your JTable class 😉

Have fun!