[5520] in java-interest
Re: Trickling in a large graphic
daemon@ATHENA.MIT.EDU (Walter Szewelanczyk)
Thu Feb 15 05:20:56 1996
Date: Thu, 15 Feb 1996 00:51:24 -0800
To: garym@maya.sos.on.ca, java-interest@java.sun.com
From: Walter@adco.com (Walter Szewelanczyk)
Hi Gary,
In article <199602132251.RAA05114@15365-news.maya.sos.on.ca>,
garym@maya.sos.on.ca says...
>
>I have an applet which needs to load a very large animation
>and then, if the animation is ready, play it back when clicked,
>otherwise just make the URL jump (I call it MovieButton)
>
>Trouble is, either the image loads jamming the client machine
>until it is done, or it doesn't load at all --- I have an
>application which needs 8 of these on one screen, and both
>scenarios cause problems.
>
>I load the image in my init() routine with
>
> img = getImage(imgURL);
> monitor.addImage( img, 2 );
>
I am not sure if this is exactly what you are asking but here it goes.
You could try implementing runnable and have the images load there so you can
do other things while this happens (you could also create a totaly different
thread if you already implement runnable).
in your run routine you could
try
monitor.waitForAll();
catch(InterruptedException E)
{
//put error code here
}
this should load the images in its own thread.
BTW I am assuming that monitor is an instance of MediaTracker.
If this is unclear please feel free to email me directly
Walt
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com