Help My friends
Help me please, I'm trying to call several images from my package with the setIcon method, actually I want the method to show me the images that I assign in my jlabel. But somehow my code throws me an error. import javax.swing.Icon; import javax.swing.ImageIcon; setColor(btnInicio2,Lbl_inicio,"/iconosV2/home-altVr.png"); resetColor(btnCliente2,Lbl_clientes,"/iconosV1/users-altV.png"); resetColor(btnProveedor2,Lbl_proveedor,"/iconosV1/truckV.png"); private void setColor(JPanel pane, JLabel lbl, String url) { pane.setBackground(new Color(89, 106, 158)); lbl.setForeground(new Color(255,255,255)); lbl.setIcon(new ImageIcon(getClass().getResource(url))); } private void resetColor(JPanel pane, JLabel lbl, String url) { pane.setBackground(new Color(57,76,135)); lbl.setForeground(new Color(166, 166, 166)); lbl.setIcon(new ImageIcon(getClass().getResource(url))); }