String []fonts; setLayout (new HorizBagLayout (10)); fonts = Toolkit.getDefaultToolkit().getFontList(); for (int i = 0; i < fonts.length; i++) { add (new Button (fonts[i])); }