ImageObserver interface in java.awt.image package is used to manage the notifications about the creation of images. It is used to take care of progress of image downloads.
imageUpdate( ) method: It is used to update an image.
boolean imageUpdate(Image imgob, int flags, int left, int top, int width, int height)
where, imgob is the image object which is updated, left, top, width, and height are used to specify corners of image.
Flags is a parameter used to inform status of update. It can have the values:
- PROPERTIES: To get properties of an image by: imgob.getProperty( ).
- WIDTH: For width of the image.
- HEIGHT: For height of the image.
- SOMEBITS: To get left, top, width, and height for drawing an image.
- FRAMEBITS: To get and display the complete frame having the image.
- ALLBITS: To get all the bits for completing the image.
- ERROR: Error has occurred; the image is not complete and can’t be displayed.
- ABORT: Production of image has been aborted.