I get an error after using NetBeans to select an image file for a JLabel icon.
IDE code that works:
IDE code that fails when I run the project:
How I'm selecting the image location:
1) from the IDE click the [...] next to the icon property of my label then choose classpath and click [select file].
2) I am able to navigate to the file correctly and it is displayed in the preview window. I can even see it when I click on the test form button.
If I run my file I get an error:
netbeans Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
<following errors removed by me>
I hope someone can help me