How to edit text
in the TextArea
in `.fxml file as such I can use line breaks and tabs.
The Textarea is predefined and can not be edited.
Images to support
FXML File
The View
String newLine = "\n"; Append or prepend the new line to your TextArea to create new lines. Save this answer.
You can use following statement in order to make text-area object non-editable with auto scrollbar: textAreaObjectName. setEditable(false);
Note that the default project created by IntelliJ uses FXML, so javafx.fxml is required along with javafx.controls . If your project uses other modules, you will need to add them as well.
If you want to directly use the text you can use something :
<TextArea prefHeight="200.0" prefWidth="200.0" text="${'Multi\nLine\tTab'}" />
In case you want to use in Scene Builder, you can switch to multi-line mode.
Switching to multi-line mode, scene builder will insert:
for \n
	 for \t
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With