I'm trying to set up my applet so that it can call a JavaScript method if it is online. The best way seems to be the use of JSObject but i'm having problems getting it working.
i have a class
Code:
public class JSTest extends PApplet
{
public void setup(){
size(400, 400);
background(255,0,255);
stroke(255,255,255);
initialize();
}
private void initialize()
{
if (online)
{
JSObject jso = JSObject.getWindow(this);
jso.call("getXML", null);
}
}
}
This throws the error at netscape.javascript.JSObject.getWindow(Unknown Source)
Does PApplet extends java.applet.Applet? Is there anything else wrong with this that you can see?
Cheers
Jimmy