I thought "JTree. setRootVisible(false)" would hide the root yet display its children, but it doesn't. I've even tried to expand its children but nothing shows when I hide the root.
Here's the code if you need to see it.
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Root");
JTree projectTree = new JTree(rootNode);
/** add some dummy data */
DefaultMutableTreeNode prNode = new DefaultMutableTreeNode("Euphoria"); //project
DefaultMutableTreeNode pNode = new DefaultMutableTreeNode("euphoria"); //package
pNode.add(new DefaultMutableTreeNode("AutoscrollTextArea.java"));
DefaultMutableTreeNode p2Node = new DefaultMutableTreeNode("euphoria.utils");
p2Node.add(new DefaultMutableTreeNode("Timer.java"));
pNode.add(p2Node);
prNode.add(pNode);
rootNode.add(prNode);
projectTree.setRootVisible(false);