Setting the Default Font of Swing Program
问题 I was wondering how to set the default font for my entire Java swing program. From my research it appears it can be done with UIManager , something to do with LookAndFeel , but I can\'t find specifically how to do it, and the UIManager appears pretty complicated. 回答1: try: public static void setUIFont (javax.swing.plaf.FontUIResource f){ java.util.Enumeration keys = UIManager.getDefaults().keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = UIManager.get