Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I center the text of an JTextArea  RSS feed

 
Constanze Michaelis
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi @ll,

I read through the Java API and the Tutorial.... maybe I didn't understand.

Is there any possibility to center the text within the JTextArea or do I have to take JTextPane?

bye
Constanze
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you want to use JTextPane ?
Using JTextArea you would need to calculate the viewing area and then add spaces.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!