When the images are initially loaded, they are only partially displayed as they may not have been loaded completely. Mediatracker tracks the status of the number of media objects which includes audio clips as well as images. Secondly, it also determines if an image has been completely loaded.
To use a media tracker, create an instance of MediaTracker and call its addImage method for each image to be tracked. In addition, each image can be assigned a unique identifier. This identifier controls the priority order in which the images are fetched. It can also be used to identify unique subsets of the images that can be waited on independently. Images with a lower ID are loaded in preference to those with a higher ID number.
/* <APPLET CODE=MediaTrackerClass.class WIDTH=400 HEIGHT=200 > </APPLET> */
public class MediaTrackerClass extends Applet implements AdjustmentListener
Scrollbar horiz=new Scrollbar(Scrollbar.HORIZONTAL,0,400,0,500);
Scrollbar vert=new Scrollbar(Scrollbar.VERTICAL,0,400,0,500);
public void init()
MediaTracker tracker=new MediaTracker(this);
public void paint(Graphics g)
public void adjustmentValueChanged(AdjustmentEvent e)