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

Center text in message box  RSS feed

 
Jason Job
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are working on a project in GUI and we're all new to it, however I'd like to make text output pretty.



Is my current about message box. I'd like to know how to center all of this text.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try HTML
 
Jason Job
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're currently just taking a program we had designed to generate a payroll, and just trying to make it gui based. Would there be any way to do it within the java gui?
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You could use HTML along with the text in that very code right there.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swing has limited HTML support in its labels (not just JLabel but also labels of other components). You can use most of the HTML 3.2 formatting tags (like <p>, <b>, etc), as long as the text starts with <html>.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!