A simple Java applet - Hello World!
import java.awt.Graphics;
public class HelloApplet extends java.applet.Applet
{ public void paint (Graphics g)
{ g.drawString(“Hello World!”, 5, 25);
The import statement allows the use of Graphics methods
The paint method uses graphics methods like drawString to draw objects on the window
You name the applet here.
The applet is a program with methods, like paint, that are called by the browser to draw in the window. This applet displays the string “Hello World!”