CarTest -...

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

Ask a homework question - tutors are online