Online Software Educational Training - IT Tutorials - Online Education Training for Computer Software


Home

JAVA APPLET

Creating Simple Applet

Creating A Hello World Applet

By following the steps on this page, you can create and use an applet. If you aren't interested in applets, you might want to skip ahead to the Learning the Java Language trail.

Create a Java Source File

Create a file named HelloWorld.java with the Java code shown here:

import java.applet.Applet;
import java.awt.Graphics;

public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}


 


Previous

Next