SOLVED my problem. The whole time I gave the program Bike 5 path insted of Bike5.jpg. Didn`t realize that extensions must be added! Sorry for wasting your time and thanks for help! :D
Type: Posts; User: ikocijan
SOLVED my problem. The whole time I gave the program Bike 5 path insted of Bike5.jpg. Didn`t realize that extensions must be added! Sorry for wasting your time and thanks for help! :D
I know, I read that in Java tutorial NullPointerException - If the pathname argument is null. I would like to know if I need to put the pictures in a specific folder or add then to my project (tried...
When I print it on console path is Bike 5.
When I try your code it always throws java.lang.NullPointerException. I think that is becase it never creates new File. I changed IF statement so that it...
OK, thanks for your answer. Tried that but it still won`t load the picture. Can you please tell me in which folder should I put the pictures? package folder or something else?
edit: Could there be...
Hello,
I am trying to create a JComboBox that would change pictures. My problem is that my method always returns null and it doesn`t return my image which is located in my package. Now I would like...