File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes addTreeSelectionListener not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "addTreeSelectionListener not working" Watch "addTreeSelectionListener not working" New topic

addTreeSelectionListener not working

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
In my code I have

The event is not being triggered. Is there anything I have to set on the tree?

Your help will be greatly appreciated,
Alejandro Barrero
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
works OK for me.

where do you call init(), so the listener is added?
Consider Paul's rocket mass heater.
subject: addTreeSelectionListener not working
Similar Threads
How to get the TreePath of a newly inserted TreeNode
Jtree - message becomes blurry when scrolls
Same JTree instance across 2 tabs
dynamically removing leaf from Jtree
how do I get the current node selection in a Jtree?