Hi
I am trying to create a JTree using netbeans, but I am having trouble
finding out how to add nodes to the tree, and changing the root node
of the tree. When I add a new JTree to a panel, netbeans creates the
tree with a no argument constructor. How do I use the IDE to add a new
root to the tree, and add nodes to this tree
Thanks
Tony
chumpboy - 14 Aug 2004 21:25 GMT
Hi Tony,
I had trouble figuring this one out, too. What you can do is go to th
properties pane for the JTree while in the NetBeans gui editor and the
click on "Code" in the panel above the properties where it say
[Properties Events Code]. There you'll see "Custom Creation Code
that lets you specify the custom code for creating a new JTre
instance, for example, creating one with an argument in it'
constructor instead of the empty default constructor. There's also
section where you can specify "Pre-Creation Code" and "Post-Creatio
Code" which should come in handy.
Hope that helps,
Christian
> *Hi
>
[quoted text clipped - 9 lines]
>
> Tony
-
chumpbo
-----------------------------------------------------------------------