Is there a way to prevent a JavaFX
TextFlow
control or its Text
children nodes to break lines. I want a TextFlow
without line break growing horizontally.
TextFlow textFlow = new TextFlow();
Text text = new Text("A verrrrryyyyy llllooooonnnnggggg Text that shouldn't contain line breaks.");
textFlow.getChildren().add(text);
Setting setWrappingWidth
to a very high value didn't remove line breaks for me.
Any help is appreciated.
To quote the API doc of TextFlow:
I tried this briefly and depending on the Parent container it seems to work as you intended it.