Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6525923

JTable sorting blocks the AWT event thread

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0"
      Java(TM) SE Runtime Environment (build 1.6.0-b105)
      Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      When the user opts to sort the table, the sorting runs on the event dispatch thread. As a result, all user input is blocked until the sort finishes.

      For a small number of rows (<1000) this isn't an issue. However on a table with 200,000 rows, once the sort has started there is no way to stop it and the user can no longer use the application (I waited 10 minutes before giving up and killing the process rather than waiting for the sort to finish.)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      One workaround may be to implement a new RowSorter which does all the sorting work in the background.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: