JDK-4244840 : Many focusLost() calls fired.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95
  • CPU: x86
  • Submitted: 1999-06-08
  • Updated: 2000-10-23
  • Resolved: 2000-10-23
Related Reports
Duplicate :  
Description

Name: skT88420			Date: 06/08/99


This bug is generic, but I can't submit any simple example to see it due to no time to make it.
I think many developers are having this focus effects.

I want to submit this to test it if you can. I have in a very complex application this situation:
   - A couple of JTextFields.
   - A data validation on all JTextFields.
   - A list of buttons to execute any actions.

The case is:
Having the focus on one JTextField, I clik on button and I process some actions (including show of one
modal dialog) on the Event thread, and then, if it's all correct I set the focus to another JTextField.
I'm using a glasspane to lock events (using the swing's tip) to the JTextFields contents panel during
the process of the actions.

The result of this is all correct, but at last, when the focus is set (via requestFocus()) to the JTextField
there exist many calls to the method focusLost() of the JTextField who has the focus.

The effect is no visible caret on the focused JTextField, but this component maintains the focus. You can
test this, clicking on another process window (any process running on the machine, not necessary Java) and
then, click on the Java frame. Then, the caret is visible on the JTextField component.

I have other side effects, changing the focus via requestFocus(), I have many carets visible on different
JTextFields.

I think you know this considering I'm not the only developer suffering this effect. At last, this
worked fine on jdk1.2.1.

Regards.
(Review ID: 83856) 
======================================================================

Comments
WORK AROUND Name: skT88420 Date: 06/08/99 None. ======================================================================
11-06-2004

EVALUATION Name: pzR10082 Date: 10/11/2000 This is not reproducible with Merlin focus API. ###@###.### 2000-10-11 ======================================================================
11-10-2000