RFR: 8335547: Support multi-line prompt text for TextArea [v4]

Andy Goryachev angorya at openjdk.org
Wed Mar 26 18:20:23 UTC 2025


On Wed, 26 Mar 2025 14:11:34 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> The tests show that only LF "\n" is rendered as a new line, there is no need to add more restrictions that is not needed
>> and the same was tested by @andy-goryachev-oracle previously in the comments and it confirms the same.
>
> That doesn't sound like a compelling reason to me. In fact, it makes it seems like a bug in JavaFX that a line break is only rendered with `\n`, but not with `\r\n` or `\r`.
> 
> In any case, the goal here is to (semantically) transform a string such that it doesn't contain line breaks, and line breaks come in three different usual forms. Our goal should always be to do the right thing, and not stop half-way and rely on unspecified rendering quirks for the rest.

We seem to have arrived at these two options:

1. acknowledge and defend the status quo in which the text layout considers only '\n' as newlines
2. enhance the text layout to handle other paragraph separators (as well as maybe add support for other symbols that impact layout, such as soft hyphen)

@kevinrushforth what do you think?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1716#discussion_r2014771096


More information about the openjfx-dev mailing list