wood burning stoves 2.0*
The moose likes Applets and the fly likes How to call one applet from another? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "How to call one applet from another?" Watch "How to call one applet from another?" New topic
Author

How to call one applet from another?

Mohit Jain
Ranch Hand

Joined: Jun 04, 2007
Posts: 74
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.


SCJP 5.0, SCWCD in progress
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41630
    
  55
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?


Ping & DNS - my free Android networking tools app
Mohit Jain
Ranch Hand

Joined: Jun 04, 2007
Posts: 74
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
Marshal

Joined: Mar 22, 2005
Posts: 41630
    
  55
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

Joined: Jun 04, 2007
Posts: 74
How to implement this using browser, please suggest..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41630
    
  55
In the applet class, you'd call

where URL is the HTML page containing the second applet. That will open a new window.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call one applet from another?