Note: depending on how you write your code, your program
may or may not include the two protected variables color and alignment.
So these two protected variables are optional. My program does include these two variables.
Constructors
ColorCreator( )
Creators a new ColorCreator with horizontal alignment and
initial Color of green.
ColorCreator(int alignment)
Creates a new ColorCreator with the specified alignment
and with initial Color of green.
ColorCreator(Color color)
Creates a new ColorCreator with initial color of the specified Color and with horizontal alignment.
ColorCreator(int alignment, Color color)
Creates a new ColorCreator with the specified alignment with an intial Color of the Color specified.
Public Methods
public void setCurrentColor(Color color)
Sets the current color to the specified color.
public Color getCurrentColor( )
Gets the current color.
public void setAlignment(int alignment)
Sets the current alignment to either horizontal or vertical.
The argument alignment should be either ColorCreator.HORIZONTAL
or ColorCreator.HORIZONTAL.
public int getAlignment( )
Gets the current alignment.
Returns either ColorCreator.HORIZONTAL or ColorCreator.HORIZONTAL.
Note on the alignments:
A ColorCreator with alignment ColorCreator.HORIZONTAL should look like:
   
A ColorCreator with alignment ColorCreator.VERTICAL should look like: