Can applets communicate with each other?
Applets may communicate with other applets running in the same virtual machine. If the applets are of the same class, they can communicate via shared static variables. If the applets are of different classes, then each will need a reference to the same class with static variables. In any case the basic idea is to pass the information back and forth through a static variable.
An applet can also get references to all other applets on the same page using the getApplets() method of java.applet.AppletContext. Once you got a reference to an applet, you can communicate with it by using its public members.
An applet can also get references to all other applets on the same page using the getApplets() method of java.applet.AppletContext. Once you got a reference to an applet, you can communicate with it by using its public members.
Can applets communicate with each other?
Reviewed by MCH
on
April 27, 2014
Rating:
No comments: