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

JTextField mouse selection off by one char

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b135)
      Java HotSpot(TM) Client VM (build 21.0-b05, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 Ultimate 32bit fully patched

      A DESCRIPTION OF THE PROBLEM :
      When trying to select a text in a JTextField, the selection starts one before the pointed character. For example, when a textfield contains "abcdef", and the mouse clicks on the letter d, the cursor goes before letter c.

      Works with 1.6u24.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Run a Java application which uses the JTextField component
      2) Type in abcdef
      3) Click on the letter d to move the text cursor

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      the cursor is blinking before the letter d
      ACTUAL -
      the cursor is blinking before the letter c

      REPRODUCIBILITY :
      This bug can be reproduced always.

            rupashka Pavel Porvatov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: