Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

applet to applet communication

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Can you tell me how to call an applet from an applet .ie. if press a button on an applet it should open another applet.
Thanks in advance
KK
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this ..........
public void actionPerformed(ActionEvent A){
AppletContext appcon=getAppletContext();
appcon.showDocument("url of the page which contains the second applet","name of the frame");
}

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well! showDocument() works in browsers only. is there any method to open a new applet in appletviewer by pressing a button on one applet?
rohit
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any body help on this ?I am also in the same prob...
Regards,
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An appletViewer is meant to be a "not fully functional browser". Just for testing basic applets. So the answer is - NO. You will have to test in a browser.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
is it possible that instead of pressing button i press some text in that applet & another applet gets opened?
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that would be a link. It would open a different HTML page with an applet on it.
 
sujata mehta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how to give a link in applet if we r using drawString method to display the text which when pressed should open another page?
or some other method should b used to draw the text?
pls reply soooon.
Thanks
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try Using Mouse Listener to check out the Point that is clicked inside the text area. Then you will be able to get a click on the Text.
then the same procedure can be adopted.
 
    Bookmark Topic Watch Topic
  • New Topic