go to previous page   go to home page   go to next page


Yes, I always do.

Plan for a Picture

house and a tree

Artists make sketches and preliminary drawings before starting on a big project. Do the same with Java. It is useful to have a sketch on graph paper before coding. Of course, the graph paper can be a grid you sketched with pencil or graph paper you found on the web.

The house picture uses rectangles, lines, and ovals. The Java Graphics object has methods for drawing each of these. The area of the picture is 350 pixels wide, 250 pixels high.

Artists use the sketch to help them transfer their ideas to canvas. We will use the sketch to transfer our ideas into a program. The location of objects in terms of X Y coordinates can be read off the graph paper.


What is the location of the upper left corner of the house?

What is the width and height of the house?