public synchronized boolean waitForID (int id, long ms) throws InterruptedException

Starts loading all images tracked by this media tracker with the specified identifier. This method waits until all the images with the specified identifier have finished loading, or until the length of time specified in milliseconds by the ms argument has passed.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the statusID, isErrorID, and isErrorAny methods to check for errors.

Parameters:
id    the identifier of the images to check
ms    the length of time, in milliseconds, to wait for the loading to complete

Returns:  true if the loading completed in time; otherwise false

Exceptions:
InterruptedException    if any thread has interrupted this thread.

See also:
java.awt.MediaTracker.waitForAll, java.awt.MediaTracker.waitForID(int), java.awt.MediaTracker.statusID, java.awt.MediaTracker.isErrorAny(), java.awt.MediaTracker.isErrorID(int)