Thanks guys!
@ cylab
I didn't use file names in the first place but it didn't show.
OK, while I was trying the thing from the FAQ cylab pointed me, this happened:
Exception in thread "main" java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(Unknown Source)
at Deneme.FullScreen.loadImages(FullScreen.java:66)
at Deneme.FullScreen.run(FullScreen.java:42)
at Deneme.FullScreen.main(FullScreen.java:32)
It can't find the source. Funny thing is that, it is there. And the other is found and printed to the screen. I use the same thing. This is driving me crazy!
This works:
1 2 3 4 5 6
| try { image = ImageIO.read(getClass().getResource("c2.png")); } catch (IOException e) { e.printStackTrace();} |
If I use image2 and image at the same time, it just doesn't show it.
I tried every path combination, my primitive method, two you guys listed. It just doesn't show it.