Java JTextArea - Adding a newline

后端 未结 4 1328
孤街浪徒
孤街浪徒 2021-01-28 08:00

So I\'m stumped. I, for some reason, seem to remember that Java does weird things when you try to add new lines to stuff... so I think that may be the problem here.

Thi

4条回答
  •  旧时难觅i
    2021-01-28 08:47

    I know there is a difference with new line characters between OS's out there. You could try

    System.getProperty("line.separator")
    

    to get the new line character for the specific os it is running on. Don't know if that will fix your problem or not.

提交回复
热议问题