In swing, you are able to click on the column headers to sort by that column. Is there a way to have one selected by default, without having to manually press it?
Asked
Active
Viewed 21 times
0
-
Use a table row sorter as per the [relevant tutorial](http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#sorting) – Hovercraft Full Of Eels Jan 04 '20 at 01:02
-
@HovercraftFullOfEels I am already able to sort the table, I am just wondering if it is possible to set a default column to be sorted. – burgerdude Jan 04 '20 at 01:08
-
The duplicate Q&A shows how to do this using a row sorter as does the tutorial. – Hovercraft Full Of Eels Jan 04 '20 at 01:09
-
Not sure how I didn't see that the first time I glanced over it. Thanks! – burgerdude Jan 04 '20 at 01:15