File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 42945
    
  68
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

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: 42945
    
  68
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: 42945
    
  68
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?