Skip to main content

Displaying Table olumns in a certain order

1 reply [Last post]
netsql
Offline
Joined: 2004-03-07
Points: 0

I want the columns in a table to be displayed in a certian order.
What is the recomended way?
move?
.V

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bino_george
Offline
Joined: 2003-06-16
Points: 0

Hi,
If you are using JXTable, you can do the following:

TableColumnModel cmodel = myjxtable.getColumnModel();
cmodel.moveColumn(0,1); // swap columns 0 and 1

If you are using JNTable, you can get the JXTable
associated with the JNTable using getTable() and
do the same as above. Thanks,

Regards,
Bino.