• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reset to Default Font  RSS feed

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AWT, Java 1.1
I can't seem to remember how to reset to the default font.
Can anyone help me out here?
I just need the font that would be used if you did nothing.
Thanks,
Drew
 
Ashish Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Drew,
Seems that in ur apps u changed the font setting of the component to the customized one and u want current LAF's default font to be set now. And here u don't wanna take back of the first default font before setting the custom one. Right??? Obviously taking backup is the worst solution.
Use :-
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
Font font = defaults.getFont("TextField.font");
 
Ashish Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AWT, Java 1.1

Sorry i didn't get this
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!