How to do JTable sorting not in event stream?

So, I have an expensive sort that can use IO or capture data from the network to help sort.

My problem is that the JTable sort is in the event stream and therefore freezes the GUI.

How can I change it so that he does not?

+3
source share
3 answers

I had a solution that I forgot to post. But still it was not perfect, so in the end I just used a table library.

Glazed lists are pretty good at sorting and viewing large datasets: http://www.glazedlists.com/

0
source

Java 6 RowSorter. , , , ( ).

+2

You can start a new thread and pass an anonymous Runnable instance:

new Thread(new Runnable() {


        public void run() {
            //Sort the JTable
        }
    }).start();
0
source

Source: https://habr.com/ru/post/1790291/


All Articles