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

In Win32, AWTEventListener missed KEY_TYPED event for swing component.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.2.0
    • client-libs
    • None

      JDK Version: jdk1.2, jdk1.2.2
      OS: Win98
      Locale: zh, C

      JDK1.2 provides a scheme, AWTEventListener, to catch awt event that been
      dispatched to system event queue. In win32 platform, if the gui component
      is swing, such as, JTextArea, the KEY_TYPED key event will be missed by
      AWTEventListener, so the event record tool based on this rule will lose
      KEY_TYPED event on swing components.
      Attahced is two short programs, one is to awt, the other is to swing.
      In them, we implement AWTEventListener, and add it to monitor system
      event dispatching, we got the following results:

      o In Solaris 2.6 platform:
      For awt, if we type 'a' once in TextArea, we got one KEY_PRESSED
      KeyEvent and one KEY_TYPED KeyEvent.

      For swing, if we typed 'a' once in JTextArea, we got two KEY_PRESSED
      KeyEvents and one KEY_TYPED KeyEvent.

      o In Win98 platform:
      For awt, if we type 'a' once in TextArea, we got one KEY_PRESSED
      KeyEvent and one KEY_TYPED KeyEvent.

      For swing, if we typed 'a' once in JTextArea, we only got two
      KEY_PRESSED KeyEvents, no KEY_TYPED KeyEvent was catched.


      jim.hu@prc 1999-06-09

            nlindenbsunw Norbert Lindenberg (Inactive)
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: