views:

264

answers:

2

We are trying to get quaqua out of our application but we had been using a call to quaqua to set the font size to be smaller with a call like this:

System.setProperty("Quaqua.sizeStyle", "small");

My question is there an easy to do the same sort of thing without using quaqua? Or does anyone know another good look and feel for os x?

+1  A: 

I also had an almost similar challenge, setting all font to a specific font. The code below will change the font size for all *.font properties in UIManager to a particular size

private static void setFontSize() {
    Hashtable defaults = UIManager.getDefaults();
    Enumeration keys = defaults.keys();
    while (keys.hasMoreElements()) {
     int fontSize = 12;
     Object key = keys.nextElement();

     if ((key instanceof String) && (((String) key).endsWith(".font"))) {
      FontUIResource font = (FontUIResource) UIManager.get(key);
      defaults.put (key, new FontUIResource(font.getFontName(), font.getStyle(), font.Size));
     }
    }
 }
n002213f
A: 

In the above answer says font.Size, but it should say fontSize. That's all.

Claudio