I'm just starting with java applets and found this website that gives a tutorial. I entered all the code but the applet didn't show up in my browser: HelloWorld.java
import java.applet.*;
import java.awt.*;
public class HelloWorld extends Applet
{
public void paint (Graphics g)
{
g.drawString("Hello World!", 300, 300);
}
}
And this is my HTML file
<HTML>
<HEAD>
<TITLE>Hello World Applet</TITLE>
</HEAD>
<BODY>
<H1>Hello World Applet</H1>
<applet code="HelloWorld.class" WIDTH=300 HEIGHT=300></applet>
</BODY>
</HTML>
I have compiled the java file (HelloWorld.class) and saved all the files on my desktop. I'm using the latest version of safari on mac osx mountain lion. I tried it in google chrome and it said to install a plugin and i did but nothing more happened?