MediaTracker class in java.awt package: addImage, checkID method

MediaTracker class is used for managing media objects. By using this class status of multiple images can be checked simultaneously.

Methods defined by MediaTracker class:

addImage( ) method: It is used for checking loading status of an image.


By using Image ID:

void addImage(Image imgob, int imgID)

By using Image ID, width and height of image:

void addImage(Image imgob, int imgID, int width, int height)

checkID( ) method: It is used to check whether an image is loaded or not. It returns true if images are loaded, otherwise false.


boolean checkID(int imgID)

Leave a Reply