I also had almost the same problem as the whole font for a particular font. The code below will change the font size for all properties *. Font in UIManager to a specific size
private static void setFontSize() {
int fontSize = 12;
Hashtable defaults = UIManager.getDefaults();
Enumeration keys = defaults.keys();
while (keys.hasMoreElements()) {
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(), fontSize));
}
}
}
source
share