FileDocCategorySizeDatePackage
FontPicker.javaAPI DocExample1038Mon Nov 09 12:45:48 GMT 1998None

FontPicker

public class FontPicker extends JFrame

Fields Summary
JFrame
parent
Color
c
Constructors Summary
public FontPicker()

    super("JColorChooser Test Frame");
    setSize(200,100);
    final JButton go = new JButton("Show FontChooser");
    go.addActionListener(new ActionListener() {
      final FontChooser chooser = new FontChooser(FontPicker.this);
      boolean first = true;
      public void actionPerformed(ActionEvent e) {
        chooser.setVisible(true);
        // If we got a real font choice, then update our go button
        if (chooser.getNewFont() != null) {
          go.setFont(chooser.getNewFont());
          go.setForeground(chooser.getNewColor());
        }
      }
    });
    getContentPane().add(go);
    addWindowListener(new BasicWindowMonitor());
  
Methods Summary
public static voidmain(java.lang.String[] args)

    FontPicker fp = new FontPicker();
    fp.setVisible(true);