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

Python
C++

JAVA


PHP
SQL
Alice

TruthTableQuiz


Description

Run it

BinaryTree.java
Connectives.java
FontFixer.java
Proposition.java
TreeNode.java
TruthTable.java
TruthTableQuiz.java

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);
            }
        }
    }
}