Re: can JTree's have multiple roots and models ?



Markus Mueller wrote:
William Z. wrote:

Maybe I can just hide the main root node and just show the children.


You are looking for JTree#setRootVisible (see [1]), don't you?

[1] http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTree.html#setRootVisible(boolean)

Note, you need to make sure that the root is always open, even after updating the tree model. If it isn't, the user can't see the (model) root node to open the display of apparent root node.


Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
.


Quantcast