Skip to main content

date sort in a JXTable

1 reply [Last post]
lolveley
Offline
Joined: 2008-12-16
Points: 0

hello

I have not found the JXTable documentation, so I ask you : how can I sort rows in a JXTable when I click on a cell whose column contains java.util.Date datas? At the moment, the sort is alphabetical, so for example "jeudi 13 mars" is after "dimanche 16 mars", although it should be before (considering an ascending sort obviously).
I do not need the entire code, but informations explaining which class to implement, which interface to create would be great!

thanks,

olivier

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
Points: 0

same as core table: make sure your model returns Date.class for the column :-)

As a general advise when seeing unexpected behaviour in any of the XSomething: if the functionality is available in their core counterpart, first check if the x behaviour differs from core behaviour. If not, it's likely a core issue and you can find help in core forums - which might be quicker :-)

Cheers
Jeanette