Java Swing 批改UI字体
Java Swing 修改UI字体
//修改字体 //方式一: for (Iterator<Entry<Object, Object>> it = UIManager.getDefaults().entrySet().iterator(); it.hasNext();) { Object key = it.next().getKey(); Object value = UIManager.get(key); if (value instanceof FontUIResource) { value = ((Font) value).deriveFont(Font.PLAIN); UIManager.put(key, value); } } //方式二: UIManager.put("swing.boldMetal", Boolean.FALSE);