B
Bill Dennis
I've got a glitch in my code that I just can't track down. When
editing a table cell, if I then click on (or even cursor to) another
table cell, a JTextField on the screen (not in the table), momentarily
gets focus, then focus jumps back to the table. I've found that when
I press the mouse key, focus jumps to the field, then when I release
the mouse key, focus goes back to the table. I've tried overriding
the requestFocus() and grabFocus() methods of the JTextField, and even
the focusNextComponent() method of the FocusManager, but none of them
is being called. Yet the focusLost() and focusGained() methods of the
JTextField's FocusListener are being invoked. I can't figure out
where the FocusEvent is coming from, thought I'm thinking it must be
somewhere in my code, though I've put in some println's everywhere
that I create a FocusEvent, and none of them is being called either.
How can I find out what is causing the focusLost() and focusGained()
to be called (i.e., who is adding the FocusEvents to the EDT)?
Thanks.
Bill Dennis
editing a table cell, if I then click on (or even cursor to) another
table cell, a JTextField on the screen (not in the table), momentarily
gets focus, then focus jumps back to the table. I've found that when
I press the mouse key, focus jumps to the field, then when I release
the mouse key, focus goes back to the table. I've tried overriding
the requestFocus() and grabFocus() methods of the JTextField, and even
the focusNextComponent() method of the FocusManager, but none of them
is being called. Yet the focusLost() and focusGained() methods of the
JTextField's FocusListener are being invoked. I can't figure out
where the FocusEvent is coming from, thought I'm thinking it must be
somewhere in my code, though I've put in some println's everywhere
that I create a FocusEvent, and none of them is being called either.
How can I find out what is causing the focusLost() and focusGained()
to be called (i.e., who is adding the FocusEvents to the EDT)?
Thanks.
Bill Dennis