You have two problems. Your put
public void ImageTest() {
It should be
public ImageTest() {
Since you have a return value the compiler thinks ImageTest is a function
and not a constructor. This happened to me once before and it took me a
while to figure out.
The next problem is that getImage is asynchronous so you need to wait for
the Image to finish loading. Try something like this
img = Toolkit.getDefaultToolkit().getImage("images/boat.gif");
MediaTracker mt = new MediaTracker(this);
mt.addImage(img, 1);
try {
mt.waitForID(1);
} catch (Exception ex) {
ex.printStackTrace();
}
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".