This code Knight.java shows the use of the method prepareImage in the Component class to use the ImageObserver to make sure that an image has been fully downloaded before drawing.