In the paint()
method of Boxy3, write code to
draw eight (8) colored boxes on the screen. Draw each box in a
different color and draw them at different places on the screen.
Also, make them different sizes. It is okay if some of the
boxes overlap. Draw them by passing appropriate values to the
drawBox()
function. The first two boxes are done for you.
Also, the drawBox()
function is empty! You should put the
code in there to make it draw a box with the given parameters.
Java has the following colors built in: BLACK, BLUE, CYAN, DARK_GRAY, GRAY, GREEN, LIGHT_GRAY, MAGENTA, ORANGE, PINK, RED, WHITE, YELLOW
©2013 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.