Hi everyone, I'm not sure if the following can be done but if it can, could someone please tell me how? I have a JTree displayed, on a JScrollPane, on a JSplitPane. Is it possible for me to add another JTree on this same view, under the previous one?
Thanks for any assistance!!
- Trish -
Joined: Mar 06, 2002
Add your tree AND the other component to a panel. You add this panel to your scrollpane.
Joined: Feb 27, 2002
Here's how it works: The first JTree is on the scrollpane. Then I click a button that adds another JTree to the same pane, but the contents and selections of the first tree are preserved. (The JTrees have checkboxes rendered on their nodes so that selections are checked). A click of another button adds another similar tree, preserving the contents of the first two, and so on. Thanks..