RFR: 8178368: Right and Center alignment of text field works incorrectly [v4]

John Hendrikx jhendrikx at openjdk.org
Fri Feb 10 18:59:52 UTC 2023


On Fri, 10 Feb 2023 13:49:43 GMT, Karthik P K <kpk at openjdk.org> wrote:

> I checked with HTML textfield and swing JTextField. In both the cases, the text gets aligned to the left (beginning of the text is shown) regardless of alignment type when text length is more than text field length. In html textfield, even prompt text has same behavior but in JavaFX prompt text gets aligned to the center (center of the text is displayed) or right (beginning of the text is hidden) as specified even when the prompt text length is more than textfield length.

Thanks for checking this, so it's possible the behavior was modelled after this common behavior of other toolkits (or just good sense in general).

> The case where prompt text length is more than text field length might not be frequent but I think we should have same behavior for both. So I think we should fix either the behavior of the text or the prompt text so that both are consistent.

Yes, agreed on that.  I would personally lean towards fixing the prompt text then, but before we keep going back and forth it might be good to see what @kevinrushforth and others think of this.

-------------

PR: https://git.openjdk.org/jfx/pull/980


More information about the openjfx-dev mailing list