File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Can Applet start another applet in same DocumentBase ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Can Applet start another applet in same DocumentBase ?" Watch "Can Applet start another applet in same DocumentBase ?" New topic

Can Applet start another applet in same DocumentBase ?

achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
I have an appletAA which does some verification.
If verified to true, then it can either
(1) start another .html file in the same getDocumentBase() and which <APPLET ... CODE=AppletBB... > tag will take me to another applet ; OR
(2) start AppletBB.class from within the appletAA.
I have the impression one cannot start an applet with another applet ???
What do I need to read up ???
I think I had better clarify my question ( I confuse myself, but that's because JAVA is so complex ... ): :roll:
I understand codeBase = FQDN
If one applet is in Apache's document root, then can I invoke another applet in a sub-directory of the document root using getApplet() ?
Only appletAA is running , appletBB is not running. BB is waiting to be called by AA.
Is there a way around this ???
Seems the only way I can do this is to introduce a new class file AppletList which stores references to other applets in a hash table. I was hpoing that it would be just another sub-routine call.
Why can't I just import appletBB and take it from there ???
Well, the question is simply this : how to start appletBB from within appletAA ???
Inside the html, I can have

but this means both will be displayed and I don't want that.
I want one applet to be displayed and when a condition verifies to true, it will start up another applet.
In other languages and olden days, we call them sub-routines. All languages have sub-routines except JAVA.
On the other hand, nothing in SUN's white-paper suggests that one applet cannot invoke another applet in the same getDocumentBase(), which adds to my frustration with JAVA
[ November 24, 2002: Message edited by: achana chan ]

humanum errare est.
I agree. Here's the link:
subject: Can Applet start another applet in same DocumentBase ?
It's not a secret anymore!