Skip to main content

Multiple Sort on JXTable

3 replies [Last post]
boomah
Offline
Joined: 2007-07-13

Hi all.

When using JXTable, the sorting just works for me.

After I've created it all I need to do is call

{code}portfolioTable.setSortOrder(0, SortOrder.ASCENDING);{code}

and the table is initially sorted by the first column as I want.

However, I would like to allow a user to ctrl click on another column header and get secondary sorting. I've looked through the forum and there were comments saying that once swingx moves to java 6, this problem will be fixed.

Swingx has now moved to java 6 so is this behaviour available, and if so, how would I enable it?

Thanks, Nick.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kleopatra
Offline
Joined: 2003-06-11

> However, I would like to allow a user to ctrl click
> on another column header and get secondary sorting.
> I've looked through the forum and there were comments
> saying that once swingx moves to java 6, this problem
> will be fixed.

not exactly: what we said is that once moved to 1.6, sorting support will be the same as in core Swing ;-)

CU
Jeanette

sirdeaz
Offline
Joined: 2010-10-19

What's the best way to implement multiple column sorting combined with a jxtable?

kleopatra
Offline
Joined: 2003-06-11

same as core JTable ;-)

CU
Jeanette