• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Html tag

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JLabel... JLabel...
Nope, not ringing any bells
Are we talking Swing here? Might want to post the question there.

Dave
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic