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

Focus events are not properly dispatched on lightweight components

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.2.0
    • 1.1.6, 1.2.0
    • client-libs
    • None
    • 1.2fcs
    • generic, sparc
    • generic, solaris_2.6
    • Not verified

      The current implementation of the Input Method Framework (IMF) depends on the focus events (gained and lost) for activation/deactivation of the attached input method. Those events are hooked in java.awt.Component.dispatchEventImpl(), but sometimes the focus lost event is missing. It is easily reproducible by the following procedure.
       
      1. Start Notepad sample in demo/jfc directory.
      2. Click the JTextArea.

      When the Notepad is started by action 1., a FocusGained event (source == JFrame) is received at java.awt.Component.dispatchEventImpl(). After clicking the JTextArea, another FocusGained event (source == JTextArea) is received, but no FocusLost event between the two FocusGained events. So the expected result is that a FocusLost event (source == JFrame) is expected between the two FocusGained events.

            xdengsunw Xianfa Deng (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: