i'm new to Java and I tried to design a form. So i have designed the background and set a Jlabel icon to use the image as background. it work .
then i change to another image ( same design just a simple edit ) but now it doesn't work. it work if i change to the original image.
I'm stuck here because i don't know where to fix this. Please help
Here is the code that i use :
bg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/bgimage.png")));
and here is the error :
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>