JTable - Tri-state row sorting?
802962Oct 4 2010 — edited Oct 6 2010I am trying to (easily) have some way to make the third click on a JTable column header make the column unsorted again. Since our tables are simple, we just use setAutoCreateRowSorter(true) on our tables, but we have a request to be able to remove sorting once you have sorted a column.
TLDR:
First click on column header: sort ascending
Second click on column header: sort descending
Third click on column header: remove sorting <------------ this is what we want.
Does anyone know of a quick way to accomplish this?