wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Html tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Html tag " Watch "Html tag " New topic
Author

Html tag

Sonara Rahul
Ranch Hand

Joined: Jul 07, 2001
Posts: 60
Hello Friends,
I have a problem in specifying font for all my labels.
For eg:
I have a label "qwert yuio pasdfgf hjkkl zxcvcxbx" .
I need font arial 12pts.
I specify it in html tag as follows:
JLabel jLab=new JLabel("<html><p style=\"font-family: Arial; font-size: 14pt; font-weight: 410; line-height:18px; color: #000000\"><b>qwert yuio pasdfgf hjkkl zxcvcxbx<b></font></html>");
All the attributes described is reflected in my label,but the line-height:18px is not reflected.
The label is placed in TextPane or just in panel.
--------------
qwert yuio |
|
pasdfgf hjkkl|
|
zxcvcxbx |
--------------
My need is to reduce the spacing b/w the lines,so i have mentioned it as "line-height:18px ".
But this is not reflected in any way in java. So pl.. help me in reducing the space b/w the lines that could be specified only within html tag.
Excepting u'r replies.
with regards,
Sonara.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

JLabel... JLabel...
Nope, not ringing any bells
Are we talking Swing here? Might want to post the question there.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Html tag
 
Similar Threads
very very simple problem.
CSS not getting applied
CSS not getting applied
JLabel/Font specification/Urgent
calender