DrawSquares - public void paint(Graphics page Square square/Square#1 square = new Square square.draw(page/Square#2 square = new Square

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************* // DrawSquares.java // // Draws 5 random Squares. //******************************************************************* import javax.swing.JApplet; import java.awt.*; public class DrawSquares extends JApplet { //-------------------------------------------------- // Constuct and draw 5 random squares //--------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public void paint(Graphics page) { Square square; //Square #1 square = new Square(); square.draw(page); //Square #2 square = new Square(); square.draw(page); //Square #3 square = new Square(); square.draw(page); //Square #4 square = new Square(); square.draw(page); //Square #5 square = new Square(); square.draw(page); } }...
View Full Document

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Ask a homework question - tutors are online