I'm trying to implement a PNG in a JLabel, but when I run the program using the path that NetBeans give me automatically, it throws me this error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "<parameter1>" is null
But in the design it loads the images normally.
This is one piece of code where I'm trying to implement a PNG:
jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/src/icons8-education-64.png")))
I have the images and the main class in the same package.