I want to know how to display tree node values in another jscrollpane using jsplitpane. for this i need to add tree selection listner, so that when i click on node its contents or child nodes should be displayed in second jscroll pane how to do that???
There are no new questions, but there may be new answers.
Joined: Jun 09, 2003
> but i want to display only the node contents on which i click in new jscrollpane.
just tried it, and it works fine (but didn't use a treeSelectionListener)
Joined: Dec 24, 2011
Is it possible to display contents of a particular node using jsplitpane containing 2 jscrollpane, 1for tree and another to display node contents . when i click on node in the tree in scrollpane1, contents of only that particular node should be displayed in scrollpane2 not in the form of tree but in the form of normal folders.
> not in the form of tree but in the form of normal folders.
I'm reading this that you want to display a list of what's immediately under a selected parent,
similar to Windows Explorer clicking on a folder in the left pane, and the folder's contents
are displayed on the right, in list form (one under the other, whether another parent or leaf).
if so, use the tree's model --> getChildrenCount()/getChild() adding each child to a JList,
then add that to the RHS of the splitpane