// A list of fonts, the 1.0 way.
Toolkit t = Toolkit.getDefaultToolkit();
printList("the 1.0 way", t.getFontList());
// The 1.2 way, using getAvailableFontFamilyNames().
printList("the 1.2 way",
GraphicsEnvironment.getLocalGraphicsEnvironment().
getAvailableFontFamilyNames());
// Calling getFontList methods activates the AWT Event thread, so:
System.exit(0);