Subject: Re: image loading in java applet

From: "George K. Thiruvathukal" <[email-masked]>
Date: Fri, 06 Nov 1998 16:51:55 -0600

I know that when working with images as a general rule, you should use
MediaTracker.

Image loading is done with threads, and the MediaTracker class is a
helper class that allows the user to "wait" for the Image to be
fully-loaded.

George

John Lou wrote:
> 
> Hi,
> 
> When using the getImage() method in an applet to load
> images, it seems getImage() won't load a new image
> from a given path (which is an argument to getImage())
> if the image was loaded before. In other words,
> getImage() still returns the old image that
> was loaded last time, even though the image for the given
> path has been changed since the last load.
> 
> I hope to have getImage() load the image again from
> the given path everytime it is called, but can't
> figure out how to do that. Any help is very much
> appreciated.
> 
> John Lou
> Jet Propulsion Laboratory
> [email-masked]

---

From: Paul Houle <[email-masked]>
Date: Wed, 11 Nov 1998 09:40:02 +0100

> helper class that allows the user to "wait" for the Image to be

    If you want it to work on Win32.  If you want it to work on other
platforms you should forget you ever heard of MediaTracker.  MediaTracker
loads four images at a time,  this is supposed to optimize the
utilization of the resources involved:  local CPU,  network bandwidth,
and server CPU and IO.  It does when Java threading meshes well with the
underlying system,  but this isn't the case on most platforms.  MacOS is
a collection of thousands of race conditions and if you don't want to
send the machine down in flames your best hope is to load only one image
at a time.  On some Unixes and some implementations MediaTracker works
OK,  but on others like Netscape on AIX performance is awful.

    The only way you're going to write applets that work is if you learn
how to use threads:  all of these things like MediaTracker that are
supposed to make it easy only make it more complicated.  I built a
high-performance image loader for Freedom VR,  you can look at the source
at

http://www.honeylocust.com/vr/

---

From: "George K. Thiruvathukal" <[email-masked]>
Date: Fri, 06 Nov 1998 16:51:55 -0600

George

---

From: John Lou <[email-masked]>
Date: Fri, 6 Nov 1998 14:46:35 -0800 (PST)

Hi,

John Lou