Line
andImg = ImageIO.read(getClass().getResource("gate_and.png"));
not working with
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: input == null!
I use Eclipse and in navigation mode, under the bin folder, there is a gate_and.png file, assuming the file is in the build path.
In the package explorer view, I have
project / src / view / class is the class that has the code above.
and
project / image / gate_and.png
I right-click on the project folder> build path> link source to add the image folder as the source. Doing this again gives the msg confirmation that the images are already in the source.
I also tried changing gate_and.png to images / gate_and.png and / images / gate _and.png, but since the image gate_and.png is in the bin folder, I think the original is correct.
, , , .
.
Matt