Description | ||
|
Applets can find other applets and send messages to them, with the following security
restrictions: Many browsers require that the applets originate from the same server. Many browsers further require that the applets originate from the same directory on the server (the same code base). The Java API requires that the applets be running on the same page, in the same browser window. Note: Some browsers let applets invoke methods on other applets - even applets on different pages in the same browser -- as long as all of the applets come from the same code base. This method of interapplet communication isn't supported by the Java API, so it's possible that it will not be supported by all browsers. An applet can find another applet either by looking it up by name (using the AppletContext getApplet method) or by finding all the applets on the page (using the AppletContext getApplets method). Both methods, if successful, give the caller one or more Applet objects. Once the caller finds an Applet object, the caller can invoke methods on the object. |
Requirements | ||
|
The applet was tested on the
following hard/software: all IBM , Thinkpad 600with PII 64 MB
and Win2000 , 133 MHz 32 MB Win98 SE, 500 MHz 128 MB WIN 98, 860 MHz 256
MB Win NT, 300 MHz OS/2. All with Netscape 4.6 (or above) |
HTML Example | ||
<APPLET CODE=Sender.class
WIDTH=300
HEIGHT=200
NAME="sender"> <PARAM NAME="RECEIVERNAME" value="schmitz"> </applet> <APPLET CODE= Receiver.class WIDTH=300 HEIGHT=200 ><PARAM NAME="name" value="schmitz"> </applet>
|
|
put this coding into your HTML page. | |
Example | ||
Example | a PopUpWindow is shown . |
Parameters | ||
Parameter |
Default | Description | |
RECEIVERNAME | - | code this param in the sending applet (Sender.class), Specify the value you code in the name param of the receiving applet. | |
name | - | specify here the name you specified in the RECEIVERNAME value of the sendung applet. |
Copyright - Usage | ||
This applet is FreeWare |
Change History | ||
Date | Version | Description | |
december 2000 | 1.0 | Creation of Applets |
Download | ||
Download (about 22KB) |