• Post Reply Bookmark Topic Watch Topic
  • New Topic

jtextpane.setText() removes \n

 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whenever i place in properly formatted html code with \n in them, they get removed when jtextpane.setText() gets called.

the document.putproperty() end of line string does not work either

anyone encountered this problem? would like to hear your thoughts
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is the way HTML works. A "\n" means nothing in HTLM. If you want to wrap text you use the "br" tag.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!