aspose file tools*
The moose likes Applets and the fly likes load applet before showing it in another page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "load applet before showing it in another page" Watch "load applet before showing it in another page" New topic
Author

load applet before showing it in another page

f jimenez
Ranch Hand

Joined: Mar 14, 2007
Posts: 30
hello guys...

the situation is like this:
on the first page, let's say a login page, i already want to load the applet. but i dont want to show it yet. i want to show this applet only in the succeeding pages. so that when i reach the page where i have to show the applet, it is not loading anymore...

is there a way to do this? please help me. i really have no idea if this can be done...

thanks a lot...


if you can't be the sun, be a star...<br />もし たいように なれないたら ほしに なれ。
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Welcome to JavaRanch.

You could add the applet to the login page with a width and height of 0. I'm not sure what happens if the user leaves the login page before the applet is fully loaded, but you can easily test that.


Ping & DNS - my free Android networking tools app
f jimenez
Ranch Hand

Joined: Mar 14, 2007
Posts: 30
Originally posted by Ulf Dittmer:
Welcome to JavaRanch.

You could add the applet to the login page with a width and height of 0. I'm not sure what happens if the user leaves the login page before the applet is fully loaded, but you can easily test that.


thanks for replying....

so you mean, i could add the applet while still on the login page and add the applet again on the page where i want to show the applet?

but is the applet on the other page fully loaded when i reach it? there will be no more loading?

can i just use the same applet on the login page and somehow pass it to other pages?

thanks...
f jimenez
Ranch Hand

Joined: Mar 14, 2007
Posts: 30
Originally posted by Ulf Dittmer:
Welcome to JavaRanch.

You could add the applet to the login page with a width and height of 0. I'm not sure what happens if the user leaves the login page before the applet is fully loaded, but you can easily test that.



hello again...

i tried this but it didn't work as expected. the applet will be loaded in both pages now and this is not what i wanted.

i wanted to let the applet start loading on one page, say a login page, and still use that loaded applet on other pages...

is this even possible? this is really what im up to...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
There is no way to avoid that the applet is loaded (i.e., initialized) on each page it's on. You can't somehow pass an applet from one page to the next. What you may be able to avoid is that the jar files are downloaded twice. Why are you concerned about load time - applets don't typically need to do a lot during initialization.
f jimenez
Ranch Hand

Joined: Mar 14, 2007
Posts: 30
Originally posted by Ulf Dittmer:
There is no way to avoid that the applet is loaded (i.e., initialized) on each page it's on. You can't somehow pass an applet from one page to the next. What you may be able to avoid is that the jar files are downloaded twice. Why are you concerned about load time - applets don't typically need to do a lot during initialization.


thanks for the reply again. this is really appreciated..

my client said that since it takes time to load the applet, why not load it in initial pages and then show this on the right screen later on. so that, that screen will immediately have an active applet-no more loading (no more of that java background with rotating rays).

do you know of any sites where this is written; that i cant pass an applet from one page to another and that there is no way to avoid loading applets where it is on? i just need a proof of this and i can't just tell my client that i got this from a forum. i need feature or an article saying this. do you happen to know any?

it is really hard to google this.

thanks a lot......
[ March 15, 2007: Message edited by: f jimenez ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
do you know of any sites where this is written

Yes, here on the JavaRanch site.

Applets simply don't work that way. Once the page they're on is no longer open, the applet gets discarded. Googling for "applet lifecycle" may get you something from Sun or a browser vendor on the topic. Is your client familiar with the concept of applets in general? I'm asking because this is really quite fundamental to how they work.
[ March 15, 2007: Message edited by: Ulf Dittmer ]
f jimenez
Ranch Hand

Joined: Mar 14, 2007
Posts: 30
Originally posted by Ulf Dittmer:

Yes, here on the JavaRanch site.

Applets simply don't work that way. Once the page they're on is no longer open, the applet gets discarded. Googling for "applet lifecycle" may get you something from Sun or a browser vendor on the topic. Is your client familiar with the concept of applets in general? I'm asking because this is really quite fundamental to how they work.



the link you posted points to the reply page...


unfortunately my client dont know anything about applets. they are new to this like me. hope the link works....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Sorry about that; it's fixed now. Note the smiley, though...
f jimenez
Ranch Hand

Joined: Mar 14, 2007
Posts: 30
Originally posted by Ulf Dittmer:
Sorry about that; it's fixed now. Note the smiley, though...


wahihihih...

yeah. it is really written here in java ranch...

very good...

and i thought of something else.... wahihihihi...

thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: load applet before showing it in another page