FileDocCategorySizeDatePackage
ColorPicker.javaAPI DocExample817Mon Nov 09 12:45:48 GMT 1998None

ColorPicker

public class ColorPicker extends JFrame

Fields Summary
Constructors Summary
public ColorPicker()

    super("JColorChooser Test Frame");
    setSize(200, 100);
    final JButton go = new JButton("Show JColorChooser");
    go.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        Color c;
        c = JColorChooser.showDialog(
                  ((Component)e.getSource()).getParent(),
                  "Demo", Color.blue);
        go.setBackground(c);
      }
    });
    getContentPane().add(go);
    addWindowListener(new BasicWindowMonitor());
  
Methods Summary
public static voidmain(java.lang.String[] args)

    ColorPicker cp = new ColorPicker();
    cp.setVisible(true);