import java.awt.*; public class ColorPicker extends Panel { public ColorPicker(String s, Color c) { b = new Button("..."); p = new Panel(); setLayout(null); color = c; l = new Label(s); l.setBounds(0, 0, 100, 20); b.setBounds(100, 0, 20, 20); p.setBounds(120, 0, 40, 20); add(l); add(b); add(p); setSize(160, 20); } public ColorPicker(String s, Color c, int w) { this(s, c); l.setBounds(0, 0, w, 20); b.setBounds(w, 0, 20, 20); p.setBounds(w + 20, 0, 40, 20); setSize(60 + w, 20); } public void setColor(Color c) { color = c; p.setBackground(c); } public Color getColor() { return color; } public boolean handleEvent(Event evt) { if(evt.target == b && evt.id == 1001) { ColorDialog cd = new Co