import java.applet.Applet; import java.awt.Graphics; // applet that displays Hello World and a rectangle on the screen public class helloapp extends Applet { public void init() { resize(120,100); } public void paint(Graphics g) { // put something on the screen g.drawString("Hello World",10,20); g.fillRect(10,40,110,50); } }