What happens is that I'm doing a project for my university and I have the following problem:
The university requires me to do the packaging of my program but in doing so it happens, it does not show any type of image, I am using the following function which is:
ImageIcon imagen = new ImageIcon("src/imagenes/descarga.png");
Icon icono = new ImageIcon(imagen.getImage().getScaledInstance(lblfondo.getWidth(), lblfondo.getHeight(), Image.SCALE_DEFAULT));
lblfondo.setIcon(icono);
I would like to know if any of you could give me a solution to this problem, thank you.
the program when running it in java comes out like this: