This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do you guys define one font style for all application?

 
Farhad Rahmati
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5115
11
Java Netbeans IDE Opera
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is Swing, you can use the methods of UIManager. For the keys, check out Rob Camick's UIManager Defaults.
 
Farhad Rahmati
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke

Thank you very much, I got it solved

there is my code, in case some one needs



Good Luck
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic