Skip to main content

date sort in a JXTable

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2008-12-16


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!



Reply viewing options

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

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 :-)