// This program draws a rudimentary van using DrawingPanel. // // DEVELOPMENT NOTES: // (These notes would not be in your program's comments. They are here // to help you understand important topics or elements of this code.) // // Note the import statement and the use of the Color and Graphics classes. // // You must download DrawingPanel.java from the course website and save it // in the same folder as this file to run this program. import java.awt.*; public class Drawing { public static void main(String[] args) { DrawingPanel panel = new DrawingPanel(400, 200); panel.setBackground(Color.LIGHT_GRAY); Graphics pen = panel.getGraphics(); // draw body pen.setColor(Color.BLACK); pen.fillRect(10, 30, 100, 50); // draw windshield pen.setColor(Color.CYAN); pen.fillRect(80, 40, 30, 20); // draw wheels pen.setColor(Color.RED); pen.fillOval(20, 70, 20, 20); pen.fillOval(80, 70, 20, 20); } }