For Programmers: Free Programming Magazines  


Home > Archive > Java Help > October 2004 > Loading picture before the using java applet / progress bar or waiting message ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Loading picture before the using java applet / progress bar or waiting message ?
Mark Richards

2004-10-07, 8:57 pm

An applet on one of my pages uses a big picture as background.
I want to load it before the applet and the rest of the html source.

By doing this I want to avoid that the pane of the applet is grey during the
load of the picture.

How do I do that?

Or even better: How can I display something like a progress bar or at least a temporary, self removing
message (dialog) "Please wait a few second..." until the picture and the applet were loaded completely?

Mark

Paul Lutus

2004-10-07, 8:57 pm

Mark Richards wrote:

> An applet on one of my pages uses a big picture as background.
> I want to load it before the applet and the rest of the html source.
>
> By doing this I want to avoid that the pane of the applet is grey during
> the load of the picture.
>
> How do I do that?


You can't.

>
> Or even better: How can I display something like a progress bar or at
> least a temporary, self removing message (dialog) "Please wait a few
> second..." until the picture and the applet were loaded completely?


Use a MediaTracker instance and a progress bar that follows the
MediaTracker's progress.

Please do not cross-post as you are doing.

--
Paul Lutus
http://www.arachnoid.com

Andrew Thompson

2004-10-08, 9:10 am

On Thu, 7 Oct 2004 23:05:09 +0200, Mark Richards wrote:

# 1. An x-post to :
comp.infosystems.www.authoring.html, comp.lang.javascript,
comp.lang.java.programmer & comp.lang.java.help is far too
wide a cross post for this basic question. Please refrain
from cross-posting and limit such questions to c.l.j.help.

Follow-ups set to *c.l.j.help*.

> An applet on one of my pages uses a big picture as background.
> I want to load it before the applet and the rest of the html source.


2. Make it smaller. Images can be shrunk in bytes a
variety of ways.

> Or even better: How can I display something like ... a temporary, self removing
> message (dialog) "Please wait a few second..." until the picture and the
> applet were loaded completely?


If you jar your applet, you can use the 'icon' element of
type 'splash' in the jnlp to launch the applet using Java
Webstart. It should use that for the splash screen image.
(obvipously your splash will say 'wait a few moments')
<http://java.sun.com/j2se/1.4.2/docs...tml#information>

Alternately, I have a splash screen that will work for simple
applets in JVM's back to the Symantec 1.1.5 and MS 1.1.4.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com