HOW to set font size and color for JButton?
Author |
Message |
rated
|
Posted: Fri May 22, 2009 7:48 pm Post subject: HOW to set font size and color for JButton? |
|
|
I am using setText to label my JButtons. Is there any way I can specify the font size and color of the text on the JButtons?
Thanks |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
HellblazerX
![](http://www.plamania.co.kr/shopimages/plmtest/2910040000213.jpg)
|
Posted: Sat May 23, 2009 11:44 am Post subject: RE:HOW to set font size and color for JButton? |
|
|
You can use the JButtons.setFont (Font) method to set a new font. However, I don't think you can change the color of the text. |
|
|
|
|
![](images/spacer.gif) |
Dark
|
Posted: Sat May 23, 2009 2:07 pm Post subject: RE:HOW to set font size and color for JButton? |
|
|
what about
|
|
|
|
|
![](images/spacer.gif) |
|
|