Listeners Firing Too Often
- From: "Jason Cavett" <jason.cavett@xxxxxxxxx>
- Date: 22 Feb 2007 13:07:51 -0800
I am developing a GUI (in Java, of course) that has a JTree on the
left hand side of the window (similar to Windows Explorer or something
like that) and on the right hand side the user can open various
property windows to edit the items in the JTree.
The issue I'm having is this...
I have added a key listener to one of the property windows so that,
when the user hits the delete key, they can delete parts of the
equation they constructed (mathematical equations). The JTree also
has a separate key listener that will delete the selected nodes in the
tree if I hit the delete key. Both these keylisteners work fine on
their own.
However, when I open up the property window and highlight part of the
equation and hit the delete key, not only does that part of the
equation delete, but then the JTree also captures the KeyAction and
deletes the currently selected node in the JTree.
I have no clue why this is happening. The JTree doesn't have direct
focus. I haven't been able to find any real connection between the
two components.
Any ideas/suggestions/?
.
- Follow-Ups:
- Re: Listeners Firing Too Often
- From: Jason Cavett
- Re: Listeners Firing Too Often
- From: Andrew Thompson
- Re: Listeners Firing Too Often
- Prev by Date: Re: Javas 'Wings' : Swing?
- Next by Date: Re: Listeners Firing Too Often
- Previous by thread: Javas 'Wings' : Swing?
- Next by thread: Re: Listeners Firing Too Often
- Index(es):
Relevant Pages
|