Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

underlining label caption

 
H Melua
Ranch Hand
Posts: 172
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys

looking at the API, i can see that class Font does not have attribute UNDERLINE... is there a way to have Jlabel caption underlined?

thank u
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
html is one way

JLabel label = new JLabel("<html><u>Hello World</u></html>");
 
H Melua
Ranch Hand
Posts: 172
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thnx

but what if the string to be underlined is a variable?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exactly the same way as any string

"string"+variable+"string"
 
H Melua
Ranch Hand
Posts: 172
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bless u, done it
Hannah
[ December 31, 2005: Message edited by: H Melua ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic