List of usage examples for java.awt GraphicsEnvironment getAvailableFontFamilyNames
public abstract String[] getAvailableFontFamilyNames(Locale l);
From source file:Main.java
public static void main(String[] args) { GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment(); String[] fontnames = e.getAvailableFontFamilyNames(Locale.CANADA); System.out.println("\nFonts available on this platform: "); for (int i = 0; i < fontnames.length; i++) System.out.println(fontnames[i]); return;// w w w . jav a2s . c om }