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

Need input method support for lightweight components

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1.6
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_2.5, solaris_2.5.1, solaris_9, windows_95, windows_nt
    • Verification:
      Not verified

      Description


      !!!NOTE!!!
          THIS FEATURE REQUEST (I.E., RFE) HAS BEEN INTEGRATED TO
          JDK1.1.6. PLEASE DO *NOT* ADD BUG REPORTS ON THE NEW FEATURE TO THIS
          BUG REPORT. THANKS!



      [richie: 6/27/97]

      More info from Oracle.

      We are trying to input Japanese characters using IME. Our code for displaying
      Japanese Kanji characters worked fine with JDK 1.1FCS, but from JDK 1.1.1FCS
      onwards, it has been broken. The problem is that in JDK 1.1.x, the KEY_TYPED
      event is not being generated by the AWT when Kanji characters are being input
      thru IME. With JDK 1.1, a KEY_TYPED event would be generated for each of the
      Kanji characters.

      JDK version: 1.1.1FCS (can also be reproduced with 1.1.2FCS, 1.1.3B, 1.1.3E)
      The problem does NOT occur with JDK 1.1FCS.
       
      OS: Windows NT 4.0 Workstation
       

      Sample code (attached as well):
       
      ------------------------------------------------------------------
      /*
      IMETest.java
      Test case for the JDK 1.1.1 bug with IME on Windows NT 4.0.
       
      Bug:
      AWT Component events are not being sent properly in JDK 1.1.1
      when you try to input Japanese Kanji characters thru IME
      on Windows NT 4.0.
       
      How to run the test:
      Run IMETest.class. A blank window will be displayed.
      Type some characters using IME.
      Watch the System output for info on what KeyEvent is
      being delivered to the Canvas.
      When you type some Kanji into IME and hit the final input
      confirmation key (i.e. Enter),
      - with JDK 1.1, you will get a KEY_TYPED event
      for each Kanji character.
      - with JDK 1.1.1, you get *no* KEY_TYPED events
      for the Kanji characters.
      You will not see any output inside the window;
      refer to the System output.

      Oracle bug #: 508469 (also see 494701)
       
      James Seo.
      Oracle Corp.
      */
       
      import java.awt.*;
      import java.awt.event.*;
       
      public class IMETest
      {
      public static void main(String[] args)
      {
      Frame f = new Frame("IME Test");
      Label l = new Label("Enter characters & watch the System
      output.");
      Canvas c = new Canvas();
       
      f.setLayout(new BorderLayout());
      f.add("Center", c);
      f.add("North", l);
      f.setSize(300,100);
      f.show();
      c.requestFocus();
      c.addKeyListener(new CanvasListener());
      }
      }
       
      class CanvasListener implements KeyListener
      {
      public void keyPressed(KeyEvent e)
      {
      System.out.println("IMETest: " + e);
      }
      public void keyReleased(KeyEvent e)
      {
      System.out.println("IMETest: " + e);
      }
      public void keyTyped(KeyEvent e)
      {
      System.out.println("IMETest: " + e);
      }
      }


      [7/2/97 koji]

      On the solaris version, it didn't work even if it was on JDK1.1.


      ==========================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              okutsu Masayoshi Okutsu
              Reporter:
              sishidasunw Shoji Ishida (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: