swing - Setting the Global Font for a Java Application -


i need set the default font application. there way not laf dependent?

figured out:

call with: setuifont (new javax.swing.plaf.fontuiresource(new font("ms mincho",font.plain, 12)));

private static void setuifont(javax.swing.plaf.fontuiresource f) {     java.util.enumeration<object> keys = uimanager.getdefaults().keys();     while (keys.hasmoreelements())     {         object key = keys.nextelement();         object value = uimanager.get(key);         if (value instanceof javax.swing.plaf.fontuiresource)         {             uimanager.put(key, f);         }     } } 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -