import java.awt.Image;
import java.awt.Toolkit;
publicclass BasicDraw {
publicstaticvoid main(String[] args) {
Image image = Toolkit.getDefaultToolkit().getImage("image.gif");
int width = image.getWidth(null);
int height = image.getHeight(null);
if (width >= 0) {
// The image has been fully loaded
} else {
// The image has not been fully loaded
}
}
}