So far I've been successful at creating a simple applet using this Java code:
Code:
import java.awt.Graphics;
public class HelloWorld extends java.applet.Applet {
public void init() {
resize(150,25);
}
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
I uploaded the class file into my web host's file manager and ran it using this HTML code, and it works perfectly:
<applet code="HelloWorld.class" width=600 height=500>
All it does is print "Hello world" in black font on a white background.
...But now I'm trying to take a much more complicated Java application and transform it into an easy to use Java applet for the web and I can't figure out why the browser comes up with nothing more than an empty applet window that says error.
The application I'm trying to turn into an applet is in the attached word document. It's the start of a car racing game that runs perfectly in the NetBeans IDE. If anyone can point me in the right direction on this please let me know. Thanks in advance.