Skip to main content

How do I specify a custom loading screen?

3 replies [Last post]
qu0ll
Offline
Joined: 2006-12-09
Points: 0

According to the notes on bug #6624980, there should now be a mechanism to specify a custom screen/image when the JVM starts in the browser that replaces the traditional orange animation. Could someone show an example of how to implement this?

Also, whilst I accept this is a good innovation, it doesn't solve the problem in bug #6633005 where I requested a screen to be displayed *before* the JVM loads even though the notes suggest it is good enough for now. Well I have to disagree. On my Windows Server 2003 machine it takes up to 20 seconds *before* the orange animation even appears. During this time there is no animation of the cursor, no text in the status bar and no response from the browser. In other words there is absolutely no indication to the user that anything productive is actually happening and one would be forgiven for thinking that the browser had frozen.

Surely it can't be that difficult to display something during this time even if it's just to say "Loading Java..." in the status bar?

--
And loving it,

-Q
_________________________________________________
Qu0llSixFour@gmail.com
(Replace the "SixFour" with numbers to email me)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kbr
Offline
Joined: 2003-06-16
Points: 0

Here's an HTML snippet. I apologize for the fact that we don't have on-line examples for this but these are coming in the next few weeks.





my_animated_loading_screen.gif needs to be relative to the codebase (I'm 99% sure).

The new Java Plug-In in 6u10 should solve the problem of the browser freezing for the long period of time. However, it does not address the problem you mentioned of wanting something drawn in the applet's area even before the JVM is bootstrapped. Doing this will require a significant amount of native code to be added to the plug-in which I do not want to add to the system. We are working on decreasing the startup time of the new plug-in which I hope will be a good enough solution since it will continue to allow us to draw the animated GIF or logo animation in Java.

See also http://jdk6.dev.java.net/plugin2/

qu0ll
Offline
Joined: 2006-12-09
Points: 0

OK thanks kbr - I have that working now.

But, as you say, it's not a panacea. Are you saying that it's too much work to even display something like "Java loading" or "Applet loading" or a user-defined *text* message on the status bar of the browser? Just SOMETHING to indicate that the browser is actually doing something.

--
And loving it,

-Q
_________________________________________________
Qu0llSixFour@gmail.com
(Replace the "SixFour" with numbers to email me)

nhurst
Offline
Joined: 2006-05-05
Points: 0

Use Javascript DOM scripting on the HTML page to present a loading screen / message / progress indicator, while your applet is loading in the background in a hidden tag.

At the simplest level, you just toggle the display of your loading message DIV element and your applet element, after x amount of seconds. Getting more sophisticated, I believe the PulpCore game framework has a nifty Java/Javascript loading mechanism for its applets. See http://www.interactivepulp.com/pulpcore/