aspose file tools*
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 36592
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
Similar Threads
Offsite link opens new window
one small question
How to force a value in a component from the backing bean
JTextpane html rendering problem