hi,
for some reason I cant get a test applet I made to load in a webpage. The applet just displays a rectangle and works fine in netbeans but is just an X in a box when I try to load it in a webpage and I get the message : Loading Java applet failed.
The code is:
import java.awt.*;
import javax.swing.*;
import java.applet.*;
/**
*
* @author Nick
*/
public class TestJApplet extends Applet {
/** Creates a new instance of TestApplet */
public TestApplet() {
}
public void init()
{
}
public void paint(Graphics g)
{
g.drawRect(30,30,30,30);
}
}
and I use
<applet code="TestApplet.class" width="100" height="100"> </applet>
within the HTML code to load the applet.
The TestApplet.class is in the same folder as the index.html file that calls it.
What could be the reason for this?
Thanks