aspose file tools*
The moose likes Applets and the fly likes I beg u all to help me out... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "I beg u all to help me out..." Watch "I beg u all to help me out..." New topic
Author

I beg u all to help me out...

Sathish Babu Adluru Subas
Greenhorn

Joined: Jan 19, 2000
Posts: 26
Hi Javacs,
I have 2 applets in my html page.the first applet has a small panel for displaying the image and the second applet has some ten images in it. what i wanted to do is that when i double-click on the image of the second applet,i wanted to display the same image in the panel of the first applet.
i want to use only AWT because prev. browsers aren't supporting Swing. please explain how to place the images on the second applet so that once i double-click on the particular image,that image should be displayed in the first applet. explaination with a sample code will be useful.
thanx
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20639
    ∞

I know it can be done, I just can't remember how.
What if one of your applets accepts a listener? The other applet can find out about the applet via a static variable and then set up the listener stuff.
That would be what I try first.

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
I remember vaguely that in Linden's Java FAQ he says that it's not a good idea doing it via static vars because the behavior of class loaders in browsers could change and away it goes.
If communication between two applets is desired, I have a simple example that may help. There is a link at:
http://www.geocities.com/~tony-alicea/java_index.html

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Sanket Bakshi
Greenhorn

Joined: May 11, 2001
Posts: 8
There are 2 approaches tht u can use over here.
firstly, use javascript to call th applet functions and play between the returned values or secondly, you can make use of inter-applet communication. (Applet to Applet communication)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I beg u all to help me out...