Oct 21, 2017, 07:21 PM


IT Acumens Proudly Presents "Gin Gly": Sms Backup / Contacts Backup / Sms Grouping Website Used by Members 85,000 - SMS Backed up 7,25,000 - Contacts Stored  28,850. For 5 Years !!

Sending Messages to Other Applets

Started by sukishan, Jul 15, 2009, 08:43 PM

previous topic - next topic
Go Down


Sending Messages to Other Applets
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.

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.

Finding an Applet by Name: The getApplet Method
The getApplet method looks through all of the applets on the current page to see if one of them has the specified name. If so, getApplet returns the applet's Applet object.

By default, an applet has no name. For an applet to have a name, one must be specified in the HTML code that adds the applet to a page. You can specify an applet's name in two ways:

By specifying a NAME attribute within the applet's <APPLET> tag. For example:
<APPLET CODEBASE=example/ CODE=Sender.class
. . .

By specifying a NAME parameter with a <PARAM> tag. For example:
<APPLET CODEBASE=example/ CODE=Receiver.class
<PARAM NAME="name" value="old pal">
. . .
A good beginning makes a good ending

Go Up

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens | GinGly :: SMS Backup | Acumen :: Discussion Board | AshokPillar :: Hosting | CineBuzz :: Latest Cinema News | My Kids Diary :: Capture your kids magical moment
Copyright 2005 - 2017 :: IT Acumens :: All Rights Reserved.
ITAcumens Forum with 2 lakhs post running for 10 years - Powered by HostGator Dedicated Server