Link to home
Start Free TrialLog in
Avatar of allmer
allmerFlag for Türkiye

asked on

JTree events not generated

Dear Experts,
I am using JTree to hold some selection possibilities.
I would like to respond to selections and perform some operations.
However, none of the event handlers are ever reached.

FocusGained, MouseReleased, ValueChanged, and KeyReleased


I am using Netbeans 6.5 with Java 1.6. or so

Any ideas how I can fix this problem?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of allmer

ASKER

I merely used the Netbeans facility to add the handlers.
but it seems that Netbeans does add it:

        jTree1.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
            public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
                jTree1ValueChanged(evt);
            }
        });

On second thought you are right.
I create a new tree and I did not add the listeners again.

Right on CEHJ!
Avatar of allmer

ASKER

Easy to miss such a problem .. thanks
:-)