8

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

FXML File

The View

The View

ItachiUchiha
  • 36,135
  • 10
  • 122
  • 176
Sevi
  • 605
  • 1
  • 6
  • 13

1 Answers1

22

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.

enter image description here

Switching to multi-line mode, scene builder will insert:

&#10; for \n 
&#9;  for \t
ItachiUchiha
  • 36,135
  • 10
  • 122
  • 176