Solved

JTree- simulating a selection event

Posted on 2000-02-18
3
452 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
Comment Utility
Hi,
  Hope this will solve ur problem
  Jtree tree ;
   tree.setSelectionRow(int rowno)
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
>> 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
Comment Utility
Thanks sadhu....that worked perfectly.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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 the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

763 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