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

Michael Strauß mstrauss at openjdk.org
Wed Mar 26 08:47:24 UTC 2025


On Tue, 25 Mar 2025 22:53:55 GMT, Ziad El Midaoui <zelmidaoui at openjdk.org> wrote:

>> Added multi line prompt support for TextArea this will provide the ability to have multiple lines in textArea as expected,
>> Also fixed tests to meet the new changes
>
> Ziad El Midaoui has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed unused imports and code

modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextFieldSkin.java line 735:

> 733:         promptNode.fontProperty().bind(getSkinnable().fontProperty());
> 734: 
> 735:         promptNode.textProperty().bind(getSkinnable().promptTextProperty().map(s -> s.replace("\n", "")));

I recommend to replace all usual newline characters with `replaceAll("[\r\n]", "")` as I can't think of a compelling reason to remove only some, but leave others in the string.

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

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


More information about the openjfx-dev mailing list