//DrawDemo.java //Demonstrates the Drawing Primitives //Andy Harris, 06/00 import java.awt.*; import java.applet.*; public class DrawDemo extends Applet { public void paint(Graphics g){ g.drawLine(10, 10, 110, 10); g.drawRect(10, 20, 100, 20); g.setColor(Color.blue); g.fillOval(10, 50, 100, 20); g.drawRoundRect(10, 80, 100, 20, 10, 10); g.setColor (Color.red); g.drawString("Hi there!", 10, 120); Image theImage = getImage(getCodeBase(), "Java.jpg"); g.drawImage(theImage, 125, 10, 100, 100, this); } // end paint } // end class def