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

Wrong cursor position in JTextArea on HiDPI display with lineWrap = true

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      openSUSE Tumbleweed
      java version "10.0.1" 2018-04-17
      Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
      Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)


      A DESCRIPTION OF THE PROBLEM :
      Cursor in JTextArea is shifted when setLineWrap(true) on HiDPI display. I think this issue is related to JDK-8142966.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      - Create a sample with JTextArea which contains a log text and setLineWrap(true)
      - Run the sample on HiDPI display or with -Dsun.java2d.uiScale=2 option
      - Set a cursor in the middle of the text
      The cursor position can be shifted from the char position


      FREQUENCY : always


        1. CheckTextSelection.java
          0.7 kB
          Pardeep Sharma
        2. Main.java
          1 kB
          Pardeep Sharma

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: