| Author |
How do you guys define one font style for all application?
|
Farhad Rahmati
Ranch Hand
Joined: Dec 16, 2010
Posts: 96
|
|
Hello guys
I know how to use setFont and Font class to change the font of compnent some thing like :
but the question is I want to write this code only once and it I want it to change the entire applications font. Is it possbile ?
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
|
If this is Swing, you can use the methods of UIManager. For the keys, check out Rob Camick's UIManager Defaults.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Farhad Rahmati
Ranch Hand
Joined: Dec 16, 2010
Posts: 96
|
|
Darryl Burke
Thank you very much, I got it solved
there is my code, in case some one needs
Good Luck
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
|
Farhad, thanks for sharing your solution. You could also use UIManager.getFont(key) which returns null if the value for key is not a Font.
|
 |
Farhad Rahmati
Ranch Hand
Joined: Dec 16, 2010
Posts: 96
|
|
Darryl Burke wrote:Farhad, thanks for sharing your solution. You could also use UIManager.getFont(key) which returns null if the value for key is not a Font.
oh Yea thank you very much for you idea.
|
 |
 |
|
|
subject: How do you guys define one font style for all application?
|
|
|