The TextArea may be set when I create the object by
myTextArea.setPrefRowCount(i);
with no problem, but if I use the "onKeyTyped" function and try to use
myTextArea.setPrefRowCount(i);
(so I can change its heigth in a way that it grows with the text it contains)
myTextArea.setPrefHeight( (i*fontheight) + additionalheight );
works well.
It feels like the setPrefRowCount(int); only is used to get the prefHeight once (checked every variable and only the prefheight is not "updated".)
If you got questions, feel free to ask.
thx
myTextArea.setPrefRowCount(i);
with no problem, but if I use the "onKeyTyped" function and try to use
myTextArea.setPrefRowCount(i);
(so I can change its heigth in a way that it grows with the text it contains)
myTextArea.setPrefHeight( (i*fontheight) + additionalheight );
works well.
It feels like the setPrefRowCount(int); only is used to get the prefHeight once (checked every variable and only the prefheight is not "updated".)
If you got questions, feel free to ask.
thx
- duplicates
-
JDK-8095654 [TextArea] prefColumnCount and prefRowCount are not applied immediately.
-
- Closed
-