File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Joined: Oct 13, 2005
Posts: 46360
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.

I agree. Here's the link:
subject: Hello with underline
It's not a secret anymore!