import java.awt.image.*; public class ImageLoaderThread extends java.lang.Thread { public ImageProducer imageProducer; public ComplexImage complexImage; public void ImageLoaderThread(ImageProducer im,ComplexImage ci) { complexImage = ci; imageProducer = im; } public void run() { // wait for the image to load while(complexImage.complete==false) { try{ sleep(10); } catch( InterruptedException ex){} } // could do some status reporting } }