Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 19 2002
Added on Oct 20 2002
5 comments
170 views