Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

formatting text in a JLabel

 
Kate Zoy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to have the text inside of a JLabel underlined. This must certainly be possible, but I can't seem to find information about anywhere.
Is there anyway I can underline the text within the JLabel declaration and initialization, or should I format the string beforehand and then had the underlined string in the JLabel?
Let me know! Thanks alot!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic