Class LetsDrawShapes

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----LetsDrawShapes

public class LetsDrawShapes
extends Applet
Applet to allow user to draw circle,square,rectangle,oval,arc,freehand or Change Color

Version:
Java 1.1.4
Author:
Larry Healy CIS 525 Assignment 3

Constructor Index

 o LetsDrawShapes()

Method Index

 o addMyButton()
Add the action buttons - 8 Buttons
 o init()
Intialize applet, Includes MouseListener(change colorStatus), MouseMotionListener(DrawYourOwn) Intialize shape dimensions and draw buttons via addMyButton
 o paint(Graphics)
Paint the object and fill it as defined by button actions and repaint method
 o selectMyColor(Graphics)
Select the color depending upon the color status dictated by the mouse click

Constructors

 o LetsDrawShapes
 public LetsDrawShapes()

Methods

 o init
 public void init()
Intialize applet, Includes MouseListener(change colorStatus), MouseMotionListener(DrawYourOwn) Intialize shape dimensions and draw buttons via addMyButton

Returns:
None
Overrides:
init in class Applet
 o selectMyColor
 public void selectMyColor(Graphics g)
Select the color depending upon the color status dictated by the mouse click

Parameters:
g - Graphics - the current graphic object in display
Returns:
color is set for curent object
 o paint
 public void paint(Graphics g)
Paint the object and fill it as defined by button actions and repaint method

Parameters:
g - Graphics - the current graphic object in display
Returns:
selected graphic is drawn with color is set for curent object by button action set to the default size
Overrides:
paint in class Container
 o addMyButton
 public void addMyButton()
Add the action buttons - 8 Buttons

Returns:
buttons are displayed that are functional and waiting to be pressed and processed by actionListener