[3264] in java-interest
applet.name?
daemon@ATHENA.MIT.EDU (Laura Lemay, Killer of Trees)
Sun Nov 5 17:17:01 1995
Date: Sun, 5 Nov 1995 12:31:58 -0800
To: java-interest@java.sun.com
From: lemayp@lne.com (Laura Lemay, Killer of Trees)
Hi, its me again.
Applet communication. Using the NAME attribute in APPLET, you can assign an
applet a name. Then, using getApplet(String), you can get ahold of
a reference to that applet object. Neat.
You can also use getApplets() to get all the currently running applets
on the page, as an Enumeration object.
Is there any way, given an applet object such as the one you get back
from getApplets(), to find out the name of that applet? I was hoping
there would be a name IV on applet that would tell me this, so I could
do something like:
for (Enumeration e = getAppletContext().getApplets(); e.hasMoreElements();) {
Applet current = (Applet)(e.nextElement());
System.out.println("Sending message to " + current.name);
sendMessage(current);
}
Just curious.
Laura
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com