Highlighting a node in Jtree

danushka_l
danushka_l used Ask the Experts™
on
i have a jtree with a list of nodes. when i select a perticular value from a combo box i want the same string value to get highlighted in the jtree. i don't know the row number or the path.
can anyone help me pls

thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Java Developer
Top Expert 2010
Commented:
you'll need to iterate thru the tree to find the node u want to hilite
Top Expert 2006

Commented:
Each item of ComboBox should know which row/node it is related to
Then use jTree.setSelectionRow(row)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial