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

If both MSIME and ATOK13 are installed in a Win32 system, JTextField will activa

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • core-libs



      Name: md23716 Date: 06/07/2000


      1. Known existing SUN Bug ID's (If Any):

      None

      2. Workarounds:

      Manually change IME every time the application regains focus.

      3. Test Case and Failure Data

      When both MSIME and ATOK13 are installed in a Win32 system, TextField will activate non-default IME. For example, If MSIME is set as the default IME, for example, JTextField will activate ATOK.

      Steps to reproduce this defect:
      -------------------------------

      1. Install ATOK13 as an alternative Japanese IME.
      2. Make sure MSIME is set as the default IME.
      3. Create the following Java source as "IMETest.java"

      ---- start ------
      import java.awt.*;
      import javax.swing.*;
      public class IMETest extends JFrame {
          public IMETest() {
              super("IMETest");
              getContentPane().setLayout(new FlowLayout());
              getContentPane().add(new JTextField(24));
              pack();
              show();
          }
         
          public static void main(String[] args) {
              new IMETest();
          }
      }
      ----- end ------

      4. Compile "IMETest.java" and run "IMETest.class"
         A JFrame with a JTextField will come up.
         Then, you can see ATOK13 tool bar will appear <===== PROBLEM
         on the lower right corner of the screen.

      (Note) Run more than two instances of IMETest concurrently, you can see the two IMEs are activated one after the other.

      IME related (ImmXxx()) calls are in the following source files:
      ===============================================================
      src\awt\pfm\awt_Component.cpp
      src\awt\pfm\awt_InputMethod.cpp
      src\awt\pfm\awt_TextComponent.cpp
      src\awt\pfm\awt_Toolkit.cpp

      Complete Windows IME API/Message documentation:
      ================================================
      http://msdn.microsoft.com/library/default.asp?uRL=/library/psdk/winbase/ime_3fub.htm

      FAQ
      ===

      - Where can I get ATOK13 and how do I install this IME?

      You need to install the popular Japanese Word Processor, Ichitaro-10 to get the alternative IME listed in this defect. Another alternative IME should do the same thing, but I have no idea where to get one or how to install it

      - Are we sure this is a Java problem and not a system problem?
        That is, do other Windows applications (such as MicroSoft WordPad
        behave differently? How?

      Yes, all Windows applications start with system-default IME, which reappears anytime the application regains focus.

      - How can I determine what the current active IME is? I looked at the
        problem in the lab but I don't know which IME toolbar I was looking
        at.

      There is an icon in the system tray with a bubble-help name.

      - Where can I get the additional IME listed in the defect?

      It comes with the Ichitaro-10 word processor.

      - How do I manually switch between IMEs?

      Using the system tray icon.

      - How do I configure the default IME?

      In the regional settings object in the control panel, select the last
      tab. Select an IME (this is the same as the locale/keyboard layouts and click the button with "S" mnemonic to set it as the default. The "A" mnemonic button adds a new one.


      More Data:
      ==========
      This problem has been reproduced exactly as described above. In addition to switching to the non-default IME on startup, the Java Window toggles to a different IME each time it loses, then regains focus. As there are 2 IMEs installed for Japanese in this scenario, it toggles between MS-IME97 and ATOK13.

      We've captured the IME messages sent to/from the Java window and compared them with that of WindowsNT WordPad. A Java window is sending/receiving MANY more messages when it starts or regains focus.

      The WM_IME_NOTIFY message is sent several times when focus is regained. The commands sent with these messages are different for each IME, but consistent each time it's sent. I don't know that this indicates anything useful, but here is a sample of the message traces I inserted in awt_Component.cpp:

      ---
      -- FOCUS GAINED (SunAwtFrame)
      ---
      ---
      -- FOCUS LOST (SunAwtFrame)
      ---
      ---
      -- FOCUS GAINED (EDIT) (NOTE: ATOK13 comes up for these messages)
      ---
      WmImeSetContext( fSet = false , lParam=C000000Fh)...hIMC=002103E5h...(EDIT)
      WmImeSetContext( fSet = true , lParam=C000000Fh)...hIMC=002103E5h...(EDIT)
      WmImeNotify(subMsg=0000000Bh, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Ah, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000002h, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Ch, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000001h, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Eh, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Eh, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000002h, bitsCandType=00000000h)...(EDIT)
      ---
      -- FOCUS LOST (EDIT)
      ---
      WmImeSetContext( fSet = false , lParam=C000000Fh)...hIMC=002103E5h...(EDIT)
      WmImeNotify(subMsg=00000001h, bitsCandType=00000000h)...(EDIT)
      ---
      -- FOCUS LOST (SunAwtFrame)
      ---
      ---
      -- FOCUS GAINED (EDIT)
      ---
      ---
      -- FOCUS GAINED (SunAwtFrame) (NOTE: MS-IME97 comes up for these messages)
      ---
      WmImeSetContext( fSet = false , lParam=C000000Fh)...hIMC=002103E5h...(EDIT)
      WmImeSetContext( fSet = true , lParam=C000000Fh)...hIMC=002103E5h...(EDIT)
      WmImeNotify(subMsg=0000000Bh, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Ah, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000002h, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000001h, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000002h, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Ch, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=0000000Bh, bitsCandType=00000000h)...(EDIT)
      ---
      -- FOCUS LOST (EDIT)
      ---
      WmImeSetContext( fSet = false , lParam=C000000Fh)...hIMC=002103E5h...(EDIT)
      WmImeNotify(subMsg=0000000Ch, bitsCandType=00000000h)...(EDIT)
      WmImeNotify(subMsg=00000001h, bitsCandType=00000000h)...(EDIT)


         SAME MESSAGES REPEAT if I alternatively click on desktop and back to Java testcase.

      Alternative AWT Testcase (shows this is not Swing specific):
      import java.awt.*;
      public class AWTTest
      {
         public static void main(String args[])
         {
            Frame frame = new Frame("IME Test");
            //frame.add(new TextField(24));
            frame.add(new TextArea());
            frame.setSize(300,300);
            frame.show();
         } /* end main() */

      }; // end class AWTTest

      4. Targeted FCS Release

              1.3FCS

      5. Suggested Fix:

      6.1 Suggested Fix

                         Still investigating

              6.2 Documentation of how root cause of failure was determined

                         The root cause has not yet been determined.

      6.3 Alternative Fix(es) considered/tested with pros and cons

                         Still investigating

      6.4 Results of testing in application/customer environment

                         Problem can be consistently reproduced.

      6.5 Regression test run status/results

                         N/A

      6.6 JCK test run status

                         N/A

      (Review ID: 105832)

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

            okutsu Masayoshi Okutsu
            mdevereuorcl Michelle Devereux (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: