|
I used following method which is, I think, ok (I used URLs before having the same problem).
I did not think yet of going around the problem... that might be a good one
to try out,
thanks willemjav
private Image downloadImage(String filename) {
Image images = getImage(getCodeBase(), "Imagestore/" + filename); //getDocumentBase()
if (images==null)
JOptionPane.showMessageDialog(infoPane, " no file " + filename);
try {
picwidth = images.getWidth(this);
}
catch (Exception e) {
JOptionPane.showMessageDialog(infoPane, "can not get image width " + e);
}
try {
picheight = images.getHeight(this);
}
catch (Exception e) {
JOptionPane.showMessageDialog(infoPane, "can not get image height " + e);
}
return images;
}
|