开发者

NewLine in JEditorPane

开发者 https://www.devze.com 2023-01-16 07:13 出处:网络
I was trying 开发者_运维技巧to set the text given below but for some reason JEditorPane is not recognizing

I was trying 开发者_运维技巧to set the text given below but for some reason JEditorPane is not recognizing \n and printing everything in a single line.

this.jEditorPane2.setText("Hello how is the weather in \n California");

Is there any way to get a new line space?


JEditorPane should support HTML, try using <br> instead of \n.

0

精彩评论

暂无评论...
验证码 换一张
取 消