• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reset to Default Font

 
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

AWT, Java 1.1


Sorry i didn't get this
 
reply
    Bookmark Topic Watch Topic
  • New Topic