1
I’m doing a graphical interface in a java project (Maven) and I’m having a problem trying to put an icon in Jlabel.
And when I run the project gives the following error:
Since I am using the netebeans GUI, there is no way for me to edit the code that is generated by the IDE itself. I tested the same interface in a common java project (without Maven) and it worked normally, does anyone know why this is happening only in Maven projects? I did some research and found some other problems similar to Maven projects, adding icons on buttons etc.
As can be seen in the first print, the icon is not being set in the properties(Right). Check if you are not setting for a different Jlabel component or, in the worst case, remove the icon reference in Gui and do it manually, by code.
– user28595
It was not set in the properties because I was still adding. After clicking on the "OK" button the icon name would be there in the properties.
– Higor
Got it, add a [mcve] to the question, so you can analyze and reproduce the problem.
– user28595