?
Solved

Highlighting a node in Jtree

Posted on 2006-10-19
2
Medium Priority
?
335 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

765 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