Can one applet load another applet on runtime, and can these two applets talk?
JavaFAQ Home » Java Applets
Question: Can one applet load another
applet on runtime, and can these two applets talk?
Answer: the answer found on "Internet
related technologies" site: "Yes one applet can load
And since you need both the applet to communicate, you need to have both
applets in the same page. But the problem in this case
is that both the applets will load independently of each other.
You can control the behavior of the other applet from the first
one. But your requirement is of loading another applet from the
You can have two frames in a page. In one frame there will be
your first applet which will load automatically when the page is
loaded. And the other frame will contain a blank page. Now on
certain event in the first applet you can use
"this.showDocument("URL") " to make a call to another applet
which you want to load. Give the target parameter as the other
frame. (You will have to give the name of the other frame) Now
when these two applets are loaded they can exchange data in
their life time."
Printer Friendly Page
Send to a Friend
Search here again if you need more info!