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!

How to fire the valueChange event of a JTree variable programmatically

843806Nov 12 2007 — edited Mar 10 2008
I have a JTree which notifies another JPanel when the selection of the JTree is changed. Since this window also displays other things which can be selected from other controls, I would like to have the window updated to display the current selection of the JTree when pressing a specific button. The easiest solution I could think of was simply to let the button fire the valueChanged event of the JTree, but that does not seem to be possible, since this method is protected by the JTree class.

Does anyone know how to do this in a smart way.

Best regards
kisn02
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2008
Added on Nov 12 2007
2 comments
423 views