Boxy 2

In the paint() method of Boxy2, write code to draw eleven (11) colored boxes on the screen. Each box should be 100 pixels wide and 100 pixels high. Draw each box in a different color and draw them at different places on the screen. It is okay if some of the boxes overlap. The first box is done for you.

This time, rather than manually writing the code for each box, you should pass appropriate values to the drawBox() function already provided.

Files Needed

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.
Creative Commons License