Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / August 2004

Tip: Looking for answers? Try searching our database.

Creating JTrees using Netbeans

Thread view: 
tony - 30 Jul 2004 10:26 GMT
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
-----------------------------------------------------------------------


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.