blob: 10cb8436dd889c55b3fb922d5bd6d9590cb2676f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package bezier;
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.JColorChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
/*
* Panel for inputting colors.
*/
public class ColorInputPanel extends JPanel {
private static final long serialVersionUID = 5201595672794938745L;
public final JColorChooser picker;
public ColorInputPanel(String label) {
this(Color.WHITE, label);
}
public ColorInputPanel(Color init, String label) {
picker = new JColorChooser(init);
setLayout(new BorderLayout());
JLabel lab = new JLabel(label);
add(lab, BorderLayout.LINE_START);
add(picker, BorderLayout.CENTER);
}
}
|