/**
* ColourPanel selects all of the colour options (hat/shades/face)
*
* @author Loren Segal
* @version 1.0
*/
import javax.swing.*;
import java.awt.*;
public class ColourPanel extends JPanel
{
private JPanel hatColorPanel = new SwatchPanel("Hat Colour", DigitalPicasso.getHatColor());
private JPanel shadesColorPanel = new SwatchPanel("Shades Colour", DigitalPicasso.getShadesColor());
private JPanel faceColorPanel = new SwatchPanel("Face Colour", DigitalPicasso.getFaceColor());
/**
* ColourPanel creates a new panel to choose colours.
*
*/
public ColourPanel()
{
super(new FlowLayout(FlowLayout.CENTER, 10, 10));
JPanel centerPanel = new JPanel(new GridLayout(3,1,0,15));
// Add the three swatch panels
centerPanel.add(hatColorPanel);
centerPanel.add(shadesColorPanel);
centerPanel.add(faceColorPanel);
add(centerPanel);
}
} Powered by
GeSHi Syntax Highlighting software.
Author of all (other) material unless otherwise specified:
Loren Segal. Copyright 2005.