Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTree - How to detect user clicked the tree image icon

843806Jun 16 2007 — edited Dec 23 2008
How does one detect a user clicked on the tree image icon node only?
If add TreeSelectionListener to solve this problem, that doesnt work because you can select the text part of the tree node and dont want that.

In my situation, the user has updated the checkboxes in the JTable tree child node, it then puts a disk image on the editing tree node. The editing tree node image changes from the folder image to a disk save image. The idea is, when the user clicks on the disk image of the tree node, it will save the data. There must be a practical way of implementing such that clicking on a tree image node only, will perform a particular operation. Please provide source sample to solve this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 20 2009
Added on Jun 16 2007
13 comments
364 views