Have Applets On The Same Page Communicate With Each Other

java packages » java.applet
Java Example Program / Sample Source Code
import java.applet.Applet;
import java.awt.*;

public class InterApplet2 extends Applet {
TextArea textArea;

public void init() {
textArea =
new TextArea(7, 30);
add
(textArea);
}

public void add(String msg) {
textArea.append(msg);
textArea.append
("\n");
}
}
Html Code
<html>
    <body>
        <applet code="InterApplet1" name="InterApplet1" height="300" width="350"></applet>
        <applet code="InterApplet2" name="InterApplet2" height="300" width="350"></applet>
    </body>
</html>

Applet


AppletContext

2011-2012 JavaExamples.org Privacy Policy Powered by Google App Engine