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

[Windows][8u] IME candidate window wrong position

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • openjdk8u
    • 8
    • client-libs
    • None

      In MS-IME, The conversion candidate window appears in a wrong position for the text field being entered. This occurs when using OpenJDK8 on Windows. I found the problem using jdk8u422 on Windows 10.

      You can reproduce the problem by running the following test:

      ----------------------------
      import java.awt.Frame;
      import java.awt.GridLayout;
      import java.awt.Panel;
      import java.awt.SystemColor;
      import java.awt.Window;

      import javax.swing.JTextField;

      public class TP extends Frame {

          public TP() {
              this.setBounds(-100, -100, 0, 0);
              this.setVisible(true);

              SubWindow w = new SubWindow(this);
              w.setVisible(true);
          }

          public static void main(String[] args) {
              TP TP = new TP();
          }

          class SubWindow extends Window {
              public SubWindow(Frame f) {
                  super(f);
                  this.setFocusable(true);
                  this.setBackground(SystemColor.red);
                  this.setBounds(0, 0, 1032, 795);
                  this.setLayout(new GridLayout(1, 2));

                  this.add(new Panel());

                  Panel p = new Panel();
                  p.setLayout(null);

                  JTextField tf = new JTextField();
                  tf.setBounds(10, 270, 300, 30);
                  p.add(tf);
                  this.add(p);

              }
          }
      }
      ----------------------------

      How to Reproduced:
      1. Go to "Language Preferences -> Add a Language" and add "Japanese"
      2. Set current IM to "Japanese"
      3. java TP
      4. Type 'a' multiple times into TextField and the conversion candidate window appears.

      Expected:
      The candidate window appears at the bottom or top adjacent to the text field.
      See attachment TP_jdk21.png using JDK21.

      Actual:
      The candidate window appears in the wrong position over the text field.
      See attachment TP_jdk8.png using JDK8.

      The cause of this problem may be an insufficient fix in JDK-8076455.
      Similar issues, JDK-8202084 and JDK-8189687, have been reported and fixed in JDK9.

            ktakakuri Kazuhisa Takakuri
            ktakakuri Kazuhisa Takakuri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: