Why does my icon handling code throw a NullPointerException?
I have added an image for my button,but when I run that frame this exception will be thrown .why?please help me. init: deps-jar: compile-single: run-single: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:138) at ClientGUI.IdAndPasswordFrame.initComponents(IdAndPasswordFrame.java:91) at ClientGUI.IdAndPasswordFrame.<init>(IdAndPasswordFrame.java:22) at ClientGUI.IdAndPasswordFrame$4.run(IdAndPasswordFrame.java:200) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent