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

TextField.setText does not update text start position

XMLWordPrintable

      It seems that when a new text is set, the start position of the text is not recomputed, as the following example demonstrates (See attachment). Initially all text fields are aligned correctly. But when you then hit the update button, all textfields are updated with a new, longer text which shows the problem. All texts seem to start at the same position which was computed for the previous text and not the recomputed new position for the new text. To temporarily work around this problem, you can reset the alignment of the text fields and then set it back to your desired value. This forces a recomputation of the text start position.

            leifs Leif Samuelsson (Inactive)
            dpausjfx Dr. Michael Paus (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: