drnick
asked on
Applett won't run
hi @all,
i'm a bit ashamed asking tihs, but however.
i'm trying to learn java, and made a simple applett, or better, copied it from a tutorial.
HelloWorldApplet.java:
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorldApplet extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
test.htm:
<HTML>
<HEAD>
<TITLE> Hello World </TITLE>
</HEAD>
<BODY>
This is the applet:<P>
<APPLET codebase="classes" code="HelloWorldApplet.cla ss" width=200 height=200 ></APPLET>
</BODY>
</HTML>
i can compile the .java file correctly.
the .class file is also placed in the same directory as the .htm file.
however, after clicking on the test.htm, the space reserved for the applet stayes gray=empty.
i'm using windows, with the java virtual machines installed correctly.
also, other applets, downloaded from the internet, will always work properly.
only mine, written and compiled by myself, don't do anything.
can somebody help me with that?
i'm a bit ashamed asking tihs, but however.
i'm trying to learn java, and made a simple applett, or better, copied it from a tutorial.
HelloWorldApplet.java:
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorldApplet extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
test.htm:
<HTML>
<HEAD>
<TITLE> Hello World </TITLE>
</HEAD>
<BODY>
This is the applet:<P>
<APPLET codebase="classes" code="HelloWorldApplet.cla
</BODY>
</HTML>
i can compile the .java file correctly.
the .class file is also placed in the same directory as the .htm file.
however, after clicking on the test.htm, the space reserved for the applet stayes gray=empty.
i'm using windows, with the java virtual machines installed correctly.
also, other applets, downloaded from the internet, will always work properly.
only mine, written and compiled by myself, don't do anything.
can somebody help me with that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER