my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Hello with underline Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Hello with underline " Watch "Hello with underline " New topic
Author

Hello with underline

kedar parundekar
Ranch Hand

Joined: May 10, 2006
Posts: 40
I want to print Hello with underline on the frame. How its possible?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38481
    
  23
There isn't a way of setting an underline attribute to a Font.
There are some Swing components (I can't remember which but JLabel might be one), which accept html.

TryThis should work; there might be other Jcomponents which accept html similarly.

CR
 
Don't get me started about those stupid light bulbs.
 
subject: Hello with underline