[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/30616] New: JTree.setRootVisible(false) hide the first node a
From: |
volker dot berlin at goebel-clan dot de |
Subject: |
[Bug swing/30616] New: JTree.setRootVisible(false) hide the first node and not the root |
Date: |
27 Jan 2007 18:46:44 -0000 |
The method setRootVisible of JTree work wrong. If I run the follow sample then
not the root is hide else the first node is hide.
Volker
==============
import javax.swing.*;
import javax.swing.tree.*;
public class Test{
public static void main(String[] args) {
DefaultMutableTreeNode root = new DefaultMutableTreeNode("ROOT");
DefaultMutableTreeNode defaultSelectedNode = new
DefaultMutableTreeNode("First Node");
root.add(defaultSelectedNode);
TreeModel treeModel = new DefaultTreeModel(root);
JTree tree = new JTree();
tree.setModel(treeModel);
tree.setRootVisible(false);
JFrame frame = new JFrame();
frame.getContentPane().add( tree );
frame.setSize(100,100);
frame.show();
}
}
--
Summary: JTree.setRootVisible(false) hide the first node and not
the root
Product: classpath
Version: 0.93
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: swing
AssignedTo: roman at kennke dot org
ReportedBy: volker dot berlin at goebel-clan dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30616
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug swing/30616] New: JTree.setRootVisible(false) hide the first node and not the root,
volker dot berlin at goebel-clan dot de <=