This Java tip shows how to list available fonts provided in the system.

 import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GraphicsEnvironment;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Vector;

import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class AllAvailableFontsComboBox extends JPanel {

  JComboBox fonts;

  public AllAvailableFontsComboBox() {
    add(new JLabel("Fonts"));

    GraphicsEnvironment gEnv = GraphicsEnvironment
    String envfonts[] = gEnv.getAvailableFontFamilyNames();
    Vector vector = new Vector();
    for (int i = 1; i < envfonts.length; i++) {
    fonts = new JComboBox(vector);

  public static void main(String s[]) {
    JFrame f = new JFrame("FontSelection");
    f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
    AllAvailableFontsComboBox fontSelection = new AllAvailableFontsComboBox();
    f.getContentPane().add(fontSelection, BorderLayout.CENTER);
    f.setSize(new Dimension(350, 250));