JTree- simulating a selection event

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.
tblackweAsked:
Who is Participating?
 
sadhuCommented:
Hi,
  Hope this will solve ur problem
  Jtree tree ;
   tree.setSelectionRow(int rowno)
0
 
heyhey_Commented:
>> 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
 
tblackweAuthor Commented:
Thanks sadhu....that worked perfectly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.