R
Ramon F Herrera
My application has two JTrees side by side, and I need to keep track
of the currently selected node, as follows:
public void valueChanged(TreeSelectionEvent e) {
pickedNode = (DefaultMutableTreeNode) leftTree.getLastSelectedPathComponent();
[...]
}
As you can see above, the 'e' variable is not being used, but it should.
So, how do I narrow down the TreeSelectionEvent, 'e' to the specific
JTree where the event was triggered??
TIA,
-Ramon F. Herrera
of the currently selected node, as follows:
public void valueChanged(TreeSelectionEvent e) {
pickedNode = (DefaultMutableTreeNode) leftTree.getLastSelectedPathComponent();
[...]
}
As you can see above, the 'e' variable is not being used, but it should.
So, how do I narrow down the TreeSelectionEvent, 'e' to the specific
JTree where the event was triggered??
TIA,
-Ramon F. Herrera