[3320] in java-interest
Re: Image ?
daemon@ATHENA.MIT.EDU (Jim Graham)
Tue Nov 7 18:07:50 1995
Date: Tue, 7 Nov 1995 11:20:49 -0800
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: java-interest@java.Eng.Sun.COM, nicolas@allmansland.com
> My question is : in both case how do you know that your picture has
> been read and it's finished ?
There are a number of ways:
When drawImage returns true it means that the entire image
was drawn (it will return false if the image was incomplete).
You can use the MediaTracker (shipped with beta, not with
prebeta, a prebeta version is also available from my home
page <http://www.java.com/people/flar/>. The MediaTracker
will allow you to check a whole bunch of images at once for
completeness, or even block waiting for the images to be
complete.
When the image is complete, if you have done either a drawImage
on it or a Component.prepareImage for it using your applet as
the ImageObserver then your imageUpdate routine will be called
with various status indications, including an indication of when
the image is complete. Normally the base Component class
implements this for you and simply repaints your applet when
new data arrives for the image...
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com