next up previous
Next: Make a snowperson Up: Homework 4: Snowpeople! Previous: Homework 4: Snowpeople!

Make a new project

1.
Use the directions I handed out last week to create a new project, except this time use the project stationery named ``cs115 - with graphics''. Name the new project Snowperson.prj and run it. Notice that three windows appear:

Application window:
Prints messages about the running program, including run time errors, if any.

Console:
Contains any output generated with print or println. For graphical applications, the console is useful for debugging.

The Frame:
The window that contains all the graphics. I found that I could not close this window by clicking on it, which is probably good, because it will remind you to quit from the interpreter every time you run the program.

2.
Go through the usual process of renaming the project, making sure the source code is named Snowperson.java and the class is named Snowperson, and the Java target is named Snowperson.

3.
Look over the source code as it currently exists and make sure you understand all the code in paintBox. Fiddle with it and see what effect your changes have. Try out the various drawing commands. For more information about them, see

http://java.sun.com/products/jdk/1.1/docs/api/java.awt.Graphics.html


next up previous
Next: Make a snowperson Up: Homework 4: Snowpeople! Previous: Homework 4: Snowpeople!
Allen B. Downey
1999-02-22