Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4244840

Many focusLost() calls fired.

XMLWordPrintable



      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)
      ======================================================================

            hgajewsksunw Hania Gajewska (Inactive)
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: