| Author |
Help needed in selecting multiple nodes in Jtree
|
Swetha Krish
Greenhorn
Joined: Jun 27, 2011
Posts: 6
|
|
on typing the string in the text box, event must be triggered to search the Jtree for the string and make them selected .
Also when the string is deleted, the nodes in the tree must be deselected
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
If you check the JTree API, you'll see three methods that you'll find useful: expandRow / expandPath, and getSelectionModel. The latter returns the TreeSelectionModel which has methods to clear the selection, and to add a TreePath to the selection. To convert from row number to TreePath you can use JTree's getPathForRow method.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Help needed in selecting multiple nodes in Jtree
|
|
|