Programming Resources
For Fun and Learning
Charles Cusack
Computer Science
Hope College
main

Python
C++

JAVA


PHP
SQL
Alice

SetOperations


FontFixer.java

import java.awt.*;
import javax.swing.*;

public class FontFixer {
   public static void setUIFont(String name){
        javax.swing.plaf.FontUIResource f;
        System.out.println("Fixing fonts");
        java.util.Enumeration keys = UIManager.getDefaults().keys();
        while (keys.hasMoreElements()) {
            Object key = keys.nextElement();
            Object value = UIManager.get (key);
            if (value instanceof javax.swing.plaf.FontUIResource){
                f = new javax.swing.plaf.FontUIResource(name, Font.PLAIN,
((Font)value).getSize());
                //System.out.println(f);
                UIManager.put (key, f);
            }
        }
    }
}