JTable and TableSorter Ques

T

Tim

Hi

I am using the TableSorter class and would like to know how to convert
the row in the view to the row in the model if the table has been
sorted. This is to delete the correct row from the Table Model.

Thanks
Tim
 
T

Tim Ward

Tim said:
I am using the TableSorter class and would like to know how to convert
the row in the view to the row in the model if the table has been
sorted. This is to delete the correct row from the Table Model.

If you are using the table sorter from Sun's tutorial the simple answer is
that you can't, the architecture, not just the implementation, is broken in
this respect - do the maths. You have to design a completely different
architecture for a sorted table; none of the free ones that I've found
actually works.

(And quite why one should have to go to all this trouble when the underlying
operating system has perfectly functional table widget which does sorting
for free has always been beyond me ...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top