I need image icon on jframe but I dont want to give path. I am using this
jLabel1.setIcon(new javax.swing.ImageIcon("C:\\Users\\ABC\\Desktop\\folder name\\1.jpg"));
Because every system has different path and this is the reason I can not compile this on other system(computer).
I need some way so I can set image icon through file name only. And the image is in src
folder.