rocket mass heater kickstarter
The moose likes Swing / AWT / SWT and the fly likes JTextPane Aligment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextPane Aligment" Watch "JTextPane Aligment" New topic
Author

JTextPane Aligment

RAJEEV BAHL
Greenhorn

Joined: Apr 26, 2001
Posts: 15
I am able to change attributes to JTextPane but unable to align the text. I used DefaultStyledDocument during creation of JTextPane and uses insertString method as explained in usage of TextCmponents at sun site. I used setPreferredSize() method of JTextPane.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTextPane Aligment