A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
Hello with underline
Joined: May 10, 2006
Apr 24, 2007 06:07:00
I want to print Hello with underline on the frame. How its possible?
Joined: Oct 13, 2005
Apr 24, 2007 06:31:00
There isn't a way of setting an underline attribute to a Font.
There are some Swing components (I can't remember which but
might be one), which accept html.
JLabel helloLabel; . . . helloLabel = new JLabel("<html><u>Hello</u></html>"); frame.add(helloLabel, BorderLayout.NORTH);
This should work; there might be other Jcomponents which accept html similarly.
I agree. Here's the link:
subject: Hello with underline
one small question
JTextpane html rendering problem
Offsite link opens new window
How to force a value in a component from the backing bean
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014