Why I cannot see an image if I do not use the full name of an image?
Posted
by Roman
on Stack Overflow
See other posts from Stack Overflow
or by Roman
Published on 2010-04-26T08:46:50Z
Indexed on
2010/04/26
8:53 UTC
Read the original article
Hit count: 238
I try to add an image to JPanel. It works if I specify the full name of the image (including name of all folders). But I want my software to be machine independent (another machine does not have the same folder structure as my machine has). So, I put my image to the same place where the source is and in my code I use just name of the image (no folders' names). It does not work. I put my image into the folder where my executables are. It does not work again. So, why it does not work and what can I do with that?
© Stack Overflow or respective owner