• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set a new paragraph for each new inserted Text in JTextPane ?

 
Christoph Ehret
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I set a new paragraph for each new sentences that are inserted in a JTextPane ? I creat a style for each parts or types that are inserted in my JTextPane and specify the attributes, for example

The problem, is that each attribute that concerns CharacterAttribute is ok, it is said the inserted text is red, bold and with a font size of 18, but every ParagraphAttribute is not set, it is said the inserted text is not centered and I have not a space below and Above !! How can I make this work ?
I thank you for your help
 
Paper has not yet been outlawed – so let your Java Swing application print with wild abandon: JPDF
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic