From one applet, how do I communicate with another applet loaded from the same server?
Created May 4, 2012
Andre van Dalen It really doesn't matter that they are loaded from the same server,
as long as they are running in the same JVM
in the browser, you can call methods between them.
If you include a name="appletA" value in the applet tag of the applet
you want to call methods on, you get a reference to it by using the AppletContext:
Checking that you get a reference to the class you expect is left as an exercize
to the reader :-)
MyApplet appl = (MyApplet) getAppletContext().getApplet("appletA");
if (null != appl) {
appl.register("Hello there!", this);
}