aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes underlining label caption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "underlining label caption" Watch "underlining label caption" New topic
Author

underlining label caption

H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
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

Joined: Jun 09, 2003
Posts: 4632
html is one way

JLabel label = new JLabel("<html><u>Hello World</u></html>");
H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
thnx

but what if the string to be underlined is a variable?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
exactly the same way as any string

"string"+variable+"string"
H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
Bless u, done it
Hannah
[ December 31, 2005: Message edited by: H Melua ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: underlining label caption
 
Similar Threads
customize confirm box button text ???
Personal Project using Python
i need help to make a big region in hssfworkbook ?
Problems while parsing files in different encoding
JFileChooser and network share