aspose file tools*
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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I set the height and width of a JLable text?
 
Similar Threads
component for clock..
Change ascent value on Font LineMetrics
How to change cursor height based on Font size
Multiline JLabel
how to make jlable text selectable and copyable ?