my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Can I set the height and width of a JLable text? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Can I set the height and width of a JLable text?" Watch "Can I set the height and width of a JLable text?" New topic
Author

Can I set the height and width of a JLable text?

Jane Green
Greenhorn

Joined: Aug 22, 2003
Posts: 5
I want to set the JLable (or JButton) text font to be two times higher than the regular font height, is there a way to do it? Anybody know that?
Thanks a lot.
Jane
kyle amburn
Ranch Hand

Joined: Jul 29, 2001
Posts: 64
Sure, you can do this for any component.

Kyle
Jane Green
Greenhorn

Joined: Aug 22, 2003
Posts: 5
Thank you, that's good news. But seems I need more specific transform of the font: I want to stretch the text, that means I need the font height to be doubled but the width don't change. More suggestions? Thanks a lot.
Jane
 
jQuery in Action, 2nd edition
 
subject: Can I set the height and width of a JLable text?