A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
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.
subject: Hello with underline
one small question
How to force a value in a component from the backing bean
Offsite link opens new window
JTextpane html rendering problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014