Darivs 0 Newbie Poster

Hello guys! Sorry newbie here. I get an error in Netbeans while trying to add an Icon to a J label. The error is:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null

After importing all of the images I used for my project. I still get this error.

This is the code in default in Netbeans:

diceButton = new javax.swing.JButton();

diceButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/dice.png"))); // NOI18N