Newlines in promptText are ignored.
Since the texarea ist a multiline input the prompt text should also support that.
Workaround: use \r instead of \n
Example:
{code}
public class Test extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
TextArea textArea = new TextArea();
textArea.setPromptText("11111111\n2222222\n33333333");
primaryStage.setScene(new Scene(textArea, 300, 250));
primaryStage.show();;
}
public static void main(String[] args) {
launch(args);
}
}
{code}
Since the texarea ist a multiline input the prompt text should also support that.
Workaround: use \r instead of \n
Example:
{code}
public class Test extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
TextArea textArea = new TextArea();
textArea.setPromptText("11111111\n2222222\n33333333");
primaryStage.setScene(new Scene(textArea, 300, 250));
primaryStage.show();;
}
public static void main(String[] args) {
launch(args);
}
}
{code}