I am new to java and trying to add an image using JFrameb ut I get the error Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException?

You'r trying to load an image that doesn't exist in.

You'r trying to load an image that doesn't exist in: jLabel1. SetIcon(new javax.swing. ImageIcon(getClass().

GetResource("/org/me/myimageapp/resources/1406_animado. Gif"))); // NOI18N Since getClass(). GetResource( xyz ) returns null you get that exception.

You can add the folder containing the image ( the structure starting with "/org/me/" etc. Etc ) to the classpath and that should do it.

Thank you for the help – PatB Jun 16 at 0:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions