1
1
.
.
3
3
.
.
3
3
A
A
p
p
p
p
l
l
e
e
t
t
I
I
n
n
f
f
o
o
This tutorial shows how to create Applet.
Applet is JAVA program meant to run under Web Browser.
E
E
x
x
a
a
m
m
p
p
l
l
e
e
Create JAVA Console Application Test.java
Create Web Page D:\Temp\Test.html
Test.java
import java.applet.*;
import java.awt.*;
public class Test extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
Test.html
<html>
<body>
Here is the output of my program:
<applet code="Test.class" width="150" height="25" alt=""></applet>
</body>
</html>
T
T
e
e
s
s
t
t
D:\Temp\Test.html