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 / General / January 2006

Tip: Looking for answers? Try searching our database.

JTree Problem

Thread view: 
Sascha Fuss - 10 Jan 2006 18:53 GMT
Hi,

I still had a couple of Jtrees and I want to create one Jtree under one
root.

For example a model which consist of model1, model2....

Did someone knows how it works.

Hope someone knows it.

Sascha
zero - 10 Jan 2006 19:56 GMT
"Sascha Fuss" <vorname.nachname@fernuni-hagen.de> wrote in news:dq0vrr$fuc
$1@tamarack.fernuni-hagen.de:

> Hi,
>
[quoted text clipped - 8 lines]
>
> Sascha

Seems to me like you'll need to create a new model, and add all the
children of the other models in a loop.

You could also implement your own TreeModel, using a Collection to store
the data.  Then you wouldn't need any loops, just Collection:addAll.

Signature

Beware the False Authority Syndrome

Thomas Weidenfeller - 11 Jan 2006 09:21 GMT
> I still had a couple of Jtrees and I want to create one Jtree under one
> root.
>
> For example a model which consist of model1, model2....
>
> Did someone knows how it works.

Either merge (by copying) the data from the separate models into a new
tree, or just implement an own TreeModel, which wraps the original
models, and dispatches to the them.

/Thomas
Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/



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



©2009 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.