Solved

Highlighting a node in Jtree

Posted on 2006-10-19
2
326 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:danushka_l
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 17771720
you'll need to iterate thru the tree to find the node u want to hilite
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17771732
Each item of ComboBox should know which row/node it is related to
Then use jTree.setSelectionRow(row)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now