Here you can find the source of getAllAvailableFonts()
public static List getAllAvailableFonts()
//package com.java2s; import java.awt.GraphicsEnvironment; import java.util.Arrays; import java.util.List; public class Main { public static List getAllAvailableFonts() { return Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()); }/*w w w. j av a 2s . co m*/ }