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

JTree with setLargeModel(true) not display correctly when expand/collapse nodes

XMLWordPrintable

    • mantis
    • x86
    • windows_nt


      ###@###.### 2002-09-10

      J2SE Version (please include all output from java -version flag):
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)


      Does this problem occur on J2SE 1.3 or 1.4? Yes / No (pick one)

      - 1.3.1: can expand and collapse node b, but when you expand node c again,
               children nodes of c node wont show, try expand node b again,
               everything are gone.

      - 1.4: same problem as following.


      Operating System Configuration Information (be specific):
       NT 4.0 SP6a

      Bug Description:
       In the following test program the action of expanding and collapsing nodes
       in a large-model tree causes the tree to be displayed incorrectly. When a
       node is expanded the existing children are removed and a new set is added
       in the tree expansion listener. This simulates a larger program where the
       tree is expanded as the user drills down, due to the expense of computing
       the child nodes. Because of the size of the tree, customers have to use
       the large model for performance, but this causes the problem.

      Steps to Reproduce (be specific):
      1. compile test(TT.java) program
      2. run test program
      3. expand node c
      4. expand node b
      5. collapse node b
      6. expand node b again
          Node b "disappears" and node c takes its place.
          Node b is really being drawn behind node c.

      Note: try on build21, node b will disappear when you try to expand node b.

            apikalev Andrey Pikalev
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: