| Author |
How To Change Label Text Size??
|
may tan
Greenhorn
Joined: Jul 22, 2005
Posts: 22
|
|
HellOoo.. Is there a way to increase the text size on a label?
|
 |
Rachel Swailes
Ranch Hand
Joined: May 18, 2004
Posts: 434
|
|
You can create a Font object with the font face and size that you need, then you can apply the font to the label using myLabel.setFont(myFont); Cheers, Rachel
|
 |
may tan
Greenhorn
Joined: Jul 22, 2005
Posts: 22
|
|
oh ok.. but wad is the coding if i want to increase the size of e texts in the label?? and how i know what are e varoius size available in java?? like for example in html.. e size range frm 1 - 7. so wad abt java??
|
 |
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
|
posted

0
|
> but wad is the coding if i want to increase the size of e texts in the label?? look at the api docs for Font, and you'll find this constructor public Font(String name,int style,int size) and you would write it something like this label.setFont(new Font("Lucida",Font.PLAIN,24)); //24 = size
|
 |
may tan
Greenhorn
Joined: Jul 22, 2005
Posts: 22
|
|
|
thanks.. i got it..
|
 |
 |
|
|
subject: How To Change Label Text Size??
|
|
|