Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ordering Jtable items using a particular column - JAVA

Trying to order a jtable by the Days of week column since the day of week names are not in order once they are displayed on the jtable. Beans binding has been used to link database(MYSQL) with the jtable, but i need an event to sort the entries by the day of week column (Mon, Tues....in this order).

like image 365
jackie mutua Avatar asked Jun 02 '26 23:06

jackie mutua


1 Answers

There are out there different kind of sortable JTables and you might have a comparator for each columns if you want. Samples can be found at java2s and also you might consider SwingX's table where as well you can specify your own comparator.

like image 53
Cris Avatar answered Jun 05 '26 12:06

Cris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!