JavaFX如何将文本写入textArea中的新行?

Att*_*oth 2 java string javafx append

我用这个: TextA.appendText(String)有没有办法把文字放到下一行?

eck*_*kig 7

String newLine = System.getProperty("line.separator");
Run Code Online (Sandbox Code Playgroud)

或者如果你想让它更直接:

String newLine = "\n";
Run Code Online (Sandbox Code Playgroud)

将新行附加或添加到您的前面TextArea以创建新行.