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

Key Event is not transfered to target components correctly.

XMLWordPrintable

    • 02
    • x86
    • windows_nt
    • Verified

      Key type event is not informed to the target component correctly.

      1. Reproducing and behavior

       Although it is a little bit difficult to reproduce and explain what problem
       is...

       (1) Compile the attached program.
         -> You can see a dialogue which has three text field.
       (2) Type (Press Key) as follows with typical speed.

          Enter
          Enter
          1
          5

          You can see the following message.

      1:keyPressed:10
      1:keyTyped:10
      1:keyReleased:10
      2:keyPressed:10
      2:keyTyped:10
      2:keyReleased:10
      3:keyPressed:49
      1:keyTyped:49
      3:keyReleased:49
      3:keyPressed:53
      1:keyTyped:53
      3:keyReleased:53

          Each line has three field seperated by ":".
          First field means the textfield number, the second is the kind of
          event and the last field is the char. code of pressed key.

          We hope the program to work as follows.

      1:keyPressed:10
      1:keyTyped:10
      1:keyReleased:10
      2:keyPressed:10
      2:keyTyped:10
      2:keyReleased:10
      3:keyPressed:49
      3:keyTyped:49
      3:keyReleased:49
      3:keyPressed:53
      3:keyTyped:53
      3:keyReleased:53

         Please see the 8th and 11th line of the first list and compare that
         of the second list.
         These events must be informed to the third textfield, but actually
         informed to the first text field.


      2. Configration

       (1) PCs
         OS: WindowsNT SV 4.0(SP6)
         MPU: Pentium Pro 200[MHz]
         Mem: 96[MB]
         
         OS: Windows2000(SP1)
         MPU: Pentium III 600E[MHz]
         Mem: 384[MB]

       (2) JDK
         1.2.2_08, 1.3.0_03 and 1.3.1fcs

      3. Sample code
         Please see the attached file, TestJTextField.java and TP.java.

      4. Note

       (1) With Merlin

        This issue does not occur with Merlin beta refresh b68.
        The following message is the result with Merlin beta.

      1:keyPressed:10
      1:keyTyped:10
      1:keyReleased:10
      2:keyReleased:49
      2:keyPressed:53
      2:keyTyped:53
      2:keyReleased:53

         The behavior seems different, but incorrect sending event does not
         happen.

        (2) Source code

          As to TestJTextField.java, a verbose loop statements are added
          for making this issue easy to happen.
          Actual program in licensee site, this issue happen without the above
          loop by typical typing speed.

            ehawkessunw Eric Hawkes (Inactive)
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: