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/