Hello,
I've never been working with JTree:s before and wondering
which type of model I should use with an JTree when I need to
work with it dynamicly (reload the content)?
Right now, I use DefaultMutableTreeNode in the constructor
for JTree, but it seems hard to reload the content?
containerTree = new JTree(getContainerTreeNode());
private DefaultMutableTreeNode getContainerTreeNode()
{
.
.
}
Thanks in advice for hints,
Michael
hiwa - 05 Sep 2006 03:56 GMT
Michael Isaksson のメッセージ:
> Hello,
>
[quoted text clipped - 16 lines]
>
> Michael
Most typically, you use DefaultTreeModel as your tree's model, and call
reload() method when the nodes have changed.