CarTest - -public void init car1 = new Car(200 150 car2 =...

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

View Full Document Right Arrow Icon
//******************************************************************** // Author: Lewis and Loftus // // Solution to Programming Project 6.17 //******************************************************************** import javax.swing.JApplet; import java.awt.Graphics; public class CarTest extends JApplet { private Car car1; private Car car2; //----------------------------------------------------------------- // Sets up the applet
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 init() { car1 = new Car(200, 150); car2 = new Car(50, 50); setVisible (true); setSize (450, 250); } //-----------------------------------------------------------------// Draws the car. //-----------------------------------------------------------------public void paint (Graphics page) { car1.draw (page); car2.draw (page); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online