CarTest2 -...

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.18 //******************************************************************** import javax.swing.JApplet; import java.awt.Graphics; import java.awt.Color; public class CarTest2 extends JApplet { private Car2 car1; private Car2 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 Car2(200, 150,; car2 = new Car2(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