| Author |
Urgent!! How to add a component to a JScrollPane?
|
Tris Rabar
Ranch Hand
Joined: Feb 27, 2002
Posts: 72
|
|
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 -
|
 |
Kay Tracid
Ranch Hand
Joined: Mar 06, 2002
Posts: 148
|
|
|
Add your tree AND the other component to a panel. You add this panel to your scrollpane.
|
 |
Tris Rabar
Ranch Hand
Joined: Feb 27, 2002
Posts: 72
|
|
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..
|
 |
 |
|
|
subject: Urgent!! How to add a component to a JScrollPane?
|
|
|