This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call one applet from another?

 
Mohit Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers

I have created a Button in an applet and want another applet window to be opened when I click this button.

Please explain how can I do that.

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really need another applet (which would imply a new HTML page being opened), or do you want to open a window from within the applet?
 
Mohit Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets say I have an applet opened in 'appletviewer' with a button. When I click on it, it invokes another java applet which opens in another 'appletviewer' window.

How can that be implemented??
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To have a second applet, you need a second HTML page. While that's no problem in a browser, it's something appletviewer can't do.
 
Mohit Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to implement this using browser, please suggest..
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the applet class, you'd call

where URL is the HTML page containing the second applet. That will open a new window.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic