Solved

Highlighting a node in Jtree

Posted on 2006-10-19
2
330 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

809 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