import java.awt.*; /** * A class that just prints the "Hello world!" message to the screen. */ public class drawApp extends java.applet.Applet { /** * initialize the applet */ public void init() { setBackground(Color.pink); repaint(); } /** * paint the applet */ public void paint(Graphics g) { double x = Math.PI; g.drawString("Hello world!" + " Here is your PI: " + x, 50, 50); g.drawString("Oval at (x,y)=(0,150) with axes=(100,50) :", 50,100); g.drawOval(0,150, 100,50); } }