Skip to Main Content

It won't let me add an image

843807Oct 20 2002 — edited Oct 22 2002
I'm trying to make a splash screen for applet and first I just want to display the image. I have this code in my init():
	Toolkit tk = Toolkit.getDefaultToolkit();
	Image splashImage = tk.getImage("R2Splash.gif");
	g.drawImage(splashImage, 30, 40, this);
It compiles, but when I try to run it, it takes me to the g.drawImage line and throws a NullPointerException.

Does this mean it's not finding the image or what?

Thanks,
Shawn
Comments
Post Details
Added on Oct 20 2002
5 comments
58 views