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 can we start one applet from another applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "can we start one applet from another applet" Watch "can we start one applet from another applet" New topic
Author

can we start one applet from another applet

kumar amrendra
Greenhorn

Joined: Apr 13, 2008
Posts: 4
i have created 3 applets 1st for the rules having ok and exit button.2nd for input having a textfield and ok,cancel and exit buttons.3rd is for output where there is a textarea and retry and ok button.now the problem is that i want when i click ok in rules window it should disappear and input window should come up and like wise.
note:All applets are of different sizes.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
Welcome to JavaRanch.

An applets can't be replaced by another one. You can load a different web page that shows the second applet, though, through the showDocument method.

Maybe you can make it a single applet, and show the 3 different screen by using a CardLayout?


Ping & DNS - updated with new look and Ping home screen widget
kumar amrendra
Greenhorn

Joined: Apr 13, 2008
Posts: 4
thnx dear
i did something of that sort but notwith cardlayout since my applets are of different sizes.i m making them in 1 applet only .resizing and add n removing components....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
Are you doing the resizing in appletviewer? I'm asking because on a real web page applets can't be resized.

I think using CardLayout would a much cleaner solution than adding and removing components every time you need to switch between pages.
kumar amrendra
Greenhorn

Joined: Apr 13, 2008
Posts: 4
but how would i resize them in cardlayout
kumar amrendra
Greenhorn

Joined: Apr 13, 2008
Posts: 4
can frames be used in cardlayout instead of panels.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
No. Frames are top-level classes that correspond to actual windows. You can't use them inside of other components.

And as said before, resizing isn't possible in real applets. You'd need to come up with a layout that can accommodate pages of various sizes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we start one applet from another applet
 
Similar Threads
applets are not being displayed
How to make applet fit any screen
A web interface to a small java application
Can I call System.exit() from an applet ? If so, how ?
jess