There is this JTable, all the columns are sortable, but there is no row sorter decleared. Does anybody know how to set the table columns sortable without a row sorter? Thanks!
Printable View
There is this JTable, all the columns are sortable, but there is no row sorter decleared. Does anybody know how to set the table columns sortable without a row sorter? Thanks!
No idea what you are asking.
Read the JTable API and follow the link to the Swing tutorial on "How to Use Tables" for a working example on sorting.
If you need more help post your SSCCE showing the problem.
Thanks for responding.
I am trying to understand the code behide this table. The columns are sortable when I run the app, but I don't see anywhere in the code that a row sorter is created/used. So I am wondering:
1. Is it even possible to set all the columns sortable without using a row sorter? I thought the answer was no, so I am very confused.
2. If it is possible, how? If anybody can point me to what I should look for in the code that would be great.
3. When a table is created by default, are the columns sortable?
Thanks!
Me either because I don't see the SSCCE.Quote:
but I don't see anywhere in the code that a row sorter is created/used.
I would post the code if I could, but my company doesn't allow it.
That's why I asked what I thoght were general questions... anyhow...
Have you ever seen a table with sortable columns without a row sorter?
Your company doesn't allow its code to be displayed, and that's not what we're asking for. We're asking for you to create a small program that is not from your company's code base, but that demonstrates the problem you're encountering. Doing this should run you afoul of no rules. Luck.