public void paint(Graphics g)
Executes code for redrawing the applet when
a paint event occurs. (A paint event occurs when
an applet is (1) first displayed, (2) restored
after being minimized, (3) exposed after being
covered by another window.)
The Graphics object g is passed in to the paint method when it the paint method is executed. The object g can then call its own drawing methods to determine what is actually "painted" on the applet when paint is executed.
public void setBackground(Color c)
Set the background color of the applet.
public void setSize(int width, int height)
Set the height and width the applet.
 
Create a Color object with red, green, and blue components of r, g, and b, respectively.
 
public void
drawRect(int x, int y, int width,
int height)
Draw boundary of a rectangle with the current color.
public void
drawRoundRect(int x, int y, int width,
int height, int aWidth, int aHeight)
Draw boundary of a rectangle with rounded corners.
public void
fillOval(int x, int y, int width,
int height)
Fill the interior of an ellipse with the current
color.
public void
fillRect(int x, int y, int width,
int height)
Fill the interior of a rectangle with the current
color.
public void
fillRoundRect(int x, int y, int width,
int height, int aWidth, int aHeight)
Fill the interior of a rectangle with rounded corners with the current
color.
public void
setColor(Color c)
Set the current color.