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

TableSorterDemo gets confused after changing value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 1.4.2
    • docs
    • b110
    • x86
    • windows_2000
    • Verified



      Name: gm110360 Date: 01/06/2004


      FULL PRODUCT VERSION :
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
      Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)


      FULL OS VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      Sorted JTable doesn't work as described in the swing tutorial.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      It can be easily reproduced using the swing JTable tutorial at:
      http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting

      Compile the provided examples TableSorterDemo.java, TableMap.java and TableSorter.java. Run TableSorterDemo. Click the check box on the first line (Mary Campione). Now click the column heading on "Vegetarian" to sort by the check boxes column. Click on the 2nd line - Angela Lih. The check box is checked but the check box underneath (on Mary Campione) UNCHECKS ITSELF!!! In fact, it is no longer "Mary Campione" - minimize the window and open it again - you will see that it is a different row alltogether! Either the cell renderer doesn't work properly, or the table needs to be somehow updated/redrawn.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Use TableSorterDemo.java, TableMap.java and TableSorter.java
      from http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting

      ---------- END SOURCE ----------
      (Incident Review ID: 200435)
      ======================================================================
      When we updated the tutorial to JDK 6 this example was re-written by Isaac (and renamed TableSortDemo). I tried the exact steps described in the bug and could not reproduce. It worked correctly. I attempted this on a Mac running beta 6.

            sharonz Sharon Zakhour (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: