Cita:
Iniciado por abulon81
hey man calm down, puedes intentar con esto tambien , imprime la ruta de tu imagen solo que sin espacios.
String dirpath=getClass().getResource("tu imagen").getPath();
Saludos.
o puedes usar esto .
Código HTML:
public Image getpath() {
String name= "/imagen.png";
try
{
URL imgURL = PDFTableDemo.class.getResource(name);
Image image = Toolkit.getDefaultToolkit().getImage(imgURL);
System.out.println(image);
}
catch(Exception e) {
e.printStackTrace();
}
finally {
return image;
}
}
I hope this helps.