JDK-8202084 : [win] IME candidate window wrong position
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 9,10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_10
  • Submitted: 2018-04-20
  • Updated: 2018-04-20
  • Resolved: 2018-04-20
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
IME candidate window is positioned incorrectly on HiDPI display.

To reproduce:
- Add (e.g.) Japanese locale, switch to IME mode.
- Run the testcase below on a display with a scale factor > 1, or scale it manually -Dsun.java2d.uiScale=<scale>.
- Type into a) frame b) window

The IME window appears in a) unscaled coordinates, b) relative to the frame, not window.

----------------------------
import javax.swing.*;
import java.awt.*;

public class scratch_7 {
  public static void main(String[] args) {
    EventQueue.invokeLater(scratch_7::run);
  }

  static void run() {
    JFrame frame = new JFrame("owner");
    JTextField text1 = new JTextField("type some hiragana here");
    frame.add(text1);
    frame.pack();
    frame.setLocation(200, 200);
    frame.setVisible(true);

    JWindow window = new JWindow(frame);
    JTextField text2 = new JTextField("type some hiragana here");
    window.add(text2);
    window.pack();
    window.setLocationRelativeTo(null);
    window.setVisible(true);
  }
}
Comments
I'm sorry, the reason was that I didn't notice the ongoing review (suspended) and as the new review was connected to this bug I closed the older one.
20-04-2018

[~ant] next time please close the new bug as a duplicate of older bug. Thx!
20-04-2018