This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jtextpane.setText() removes \n  RSS feed

 
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: 2800
15
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!