JTree- simulating a selection event

Posted on 2000-02-18
Medium Priority
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.
Question by:tblackwe

Accepted Solution

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

Expert Comment

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 ?

Author Comment

ID: 2546787
Thanks sadhu....that worked perfectly.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

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.

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

600 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