Initial state of autoCreateRowSorter in Swing JTable
Posted
by Nazgulled
on Stack Overflow
See other posts from Stack Overflow
or by Nazgulled
Published on 2010-06-01T20:41:07Z
Indexed on
2010/06/01
20:43 UTC
Read the original article
Hit count: 207
I have this JTable on my Swing app with the autoCreateRowSorter enabled. My table only has 3 columns, two strings and one int, it works well for all of them when I click the column headers.
However, I'm looking for way to do it programatically. I wanted to set the "initial state" for this table. With the Windows look and feel, the column header (when sorted) has a little arrow showing the sort order. But at startup that doesn't show, I have to do one initial click.
How can I do that by code?
© Stack Overflow or respective owner