This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Zero to AI - A non-technical, hype-free guide to prospering in the AI era and have Nicolò Valigi and Gianluca Mauro on-line!
See this thread for details.
Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

I beg u all to help me out...

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Trailboss
Posts: 23226
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic