/** * Loads an image from a file. * * @param tk The toolkit to be used to load the image. * @param file The name of the file containing the image. * @param tracker The media tracker tracking the progress of the load. * @return The image that was loaded, as an Image object. */ private Image loadImage(Toolkit tk, String file, MediaTracker tracker) { Image result = tk.createImage(file); tracker.addImage(result, 0); return result; }