1 |
When drawImage is called, it draws only the pixels of the image that are already available.
|
2 |
Then it creates a thread for the imageObserver. Whenever more of the image becomes available, it activates the method imageUpdate, which in turn call paint and drawImage, so that more of the image will show on the screen.
|
3 |
The default imageUpdate doesn't work if you are double buffering the window in which the image appears.
|
4 |
More control over showing the image as it downloads can be obtained by working with the MediaTracker class, using methods that tell you when the image has fully arrived.
-
Another method is prepareImage(MyImage, this);
-
which returns a boolean that is true when image is fully downloaded.
|