inter applet variable transfer

can anyone tell me ...how to transfer variables between two applets....can someone give me full code taking some example.

Message was edited by:

shubhanshu_java

[180 byte] By [shubhanshu_javaa] at [2007-11-27 10:15:56]
# 1

Use static variable, example at http://www.rgagnon.com/javadetails/java-0023.html

Call directly the target applet , example at

http://www.rgagnon.com/javadetails/java-0022.html

If the applets are not on the same page, use the query part of the url. Example at http://www.rgagnon.com/javadetails/java-0041.html

Bye.

--

http://www.rgagnon.com/howto.html

RealHowToa at 2007-7-28 15:42:28 > top of Java-index,Desktop,Core GUI APIs...
# 2

it is not showing the input in first applet to output in second applet...instead it is showing that input in address space of second applet....

like i am giving input =i am here.

the address of second applet appears like this .....

file:///D:/sunny/SecondAppletJ.html?message=i+am+here

and in the text field i...it shows...

/sunny/SecondAppletJ.html

telll me what to do?

shubhanshu_javaa at 2007-7-28 15:42:28 > top of Java-index,Desktop,Core GUI APIs...
# 3

Did you try the on-line example ?

http://www.rgagnon.com/examples/FirstAppletJ.html

> the address of second applet appears like this .....

> file:///D:/sunny/SecondAppletJ.html?message=i+am+here

I see that you are working without a web server, you won't`succeed with IE because the query part of the URL won't be available.

--

http://www.rgagnon.com/howto.html

RealHowToa at 2007-7-28 15:42:28 > top of Java-index,Desktop,Core GUI APIs...
# 4

which server should i go for......and how did u make that applet that u mentioned in the previous reply....

shubhanshu_javaa at 2007-7-28 15:42:28 > top of Java-index,Desktop,Core GUI APIs...
# 5

> which server should i go for......and how did u make

> that applet that u mentioned in the previous reply....

Any server will do ... Apache, IIS ... The thing is IE do not behave as expected if you are running an Applet direclty with file:// .

You install a local web server on your workstation, you deploy your html page and Applet and you display your the html page (with the Applet embedded) typically with something like http://localhost:8080/mypage.html

.

Bye.

--

http://www.rgagnon.com/howto.html

RealHowToa at 2007-7-28 15:42:28 > top of Java-index,Desktop,Core GUI APIs...