Solved

JTree- simulating a selection event

Posted on 2000-02-18
3
455 Views
Last Modified: 2008-03-17
Is there a way that I can simulate a TreeSelectionEvent in my code.  I would like to have some events occur without the user having to explicitly select a node.
0
Comment
Question by:tblackwe
3 Comments
 

Accepted Solution

by:
sadhu earned 50 total points
ID: 2537140
Hi,
  Hope this will solve ur problem
  Jtree tree ;
   tree.setSelectionRow(int rowno)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2537980
>> I would like to have some events occur without the user having to explicitly select a node.


just call your event-handling method directly ?
0
 

Author Comment

by:tblackwe
ID: 2546787
Thanks sadhu....that worked perfectly.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

776 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