File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
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.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
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-2015