• Post Reply Bookmark Topic Watch Topic
  • New Topic

add new line via StyledDocument

 
chen young
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using StyledDocument for printing in JTextPane
The problem is that I can’t use “\n” for new line because of textPane.setSelectionStart is now working properly.

How can I add new line via StyledDocument ?

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!