tags:

views:

21

answers:

1

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?

+1  A: 

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

Mark E
Thanks brother.
Mohit Bansal