I made this very simple applet just for fun but it doesn't work:
package applet;
import java.awt.*;
public class Applet extends java.applet.Applet
{
public void init()
{
}
public void paint(Graphics g)
{
g.drawOval(0, 0, 250, 100);
g.setColor(Color.RED);
g.drawString("First Applet", 10, 50);
}
}
And heres my HTML code:
<html>
<head>
<title> App </title>
</head>
<body>
Program <br/>
<applet code="Applet.class" width="300" height="300"></applet>
</body>
</html>
It gives this error:
ClassNotFoundException
What is wrong and how do I fix it?