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

unix: unexpected JTree node handle appearing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 1.3.0, 1.4.1
    • client-libs
    • x86, sparc
    • linux, solaris_7, windows_98



      Name: icR10030 Date: 06/16/2000



      JDK version:
      java version "1.3.0beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta-b08)
      Java HotSpot(TM) Server VM (build 1.3.0beta-b06, mixed mode)

      OS version:
      Red Hat Linux 6.1

      Unexpected JTree node handle for node which can't be expanded appears
      during initial JTree visualization. But after clicking the handle is
      disappeared.

      The following test example demonstrates the bug. After JTree visualization,
      the tree contains three nodes "Root", "Children1", "Children2".
      The node "Children1" has node handle which disappears after clicking it.
      //----------------------------- begin of JTreeTests.java ------------------------------------
      import javax.swing.*;
      import javax.swing.tree.*;

      public class JTreeTests {
      public static void main( String[] argv ) {
      new JTreeTests().test();
      }
         
      public void test() {
      JFrame aFrame = new JFrame();
      JTree tree = creTree();

      aFrame.setSize(500,150);
      aFrame.getContentPane().add(tree);
      aFrame.setVisible(true);
      }

      protected JTree creTree() {
      JTree tree = null;

      DefaultMutableTreeNode
      top = new DefaultMutableTreeNode("Root"),
      node1 = new DefaultMutableTreeNode("Children1"),
      node2 = new DefaultMutableTreeNode("Children2", false);
      top.add(node1);
      top.add(node2);

      tree = new JTree(top, true);

      return tree;
      }
      }
      //----------------------------- end of JTreeTests.java ------------------------------------

      ======================================================================

      Name: iaR10016 Date: 10/29/2002


      JCK1.4a interactive test api/javax_swing/interactive/JTreeTests.html#JTree [JTreeTest006]
      fails due to this bug with JDK1.4.2-b04 under Linux and Windows.

      ======================================================================

            svioletsunw Scott Violet (Inactive)
            ichesunw Iche Iche (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: