Hello everyone. I'm currently exploring Java's GUI and trying a lot of codes now. I found a game GUI source code on the net. This program uses images to properly run. I can run the program now but it only displays black screen. It already have the folder for the images but I can't properly connect it to the program. Please, I need help. ._.

Recommended Answers

All 5 Replies

Without seeing your code its impossible to say what's wrong with it.

Exception in thread "Thread-2" java.lang.IllegalArgumentException: input == null!
        at javax.imageio.ImageIO.read(ImageIO.java:1362)
        at moon_lander.Framework.LoadContent(Framework.java:115)
        at moon_lander.Framework.GameLoop(Framework.java:162)
        at moon_lander.Framework.access$000(Framework.java:21)
        at moon_lander.Framework$1.run(Framework.java:90)

it shows that exception.
it really runs except that it only displays a black screen. o.o

Line 3 of that message tells you exactly where in your code it's going wrong. Hang on a minute while I start my psychic code reader that will allow me to see what that code says...

I just need help into properly placing the files and putting up the file paths of the folder that contains the images needed for this program.

it only has this
/moon_lander(the name of the folder)/resources/backgroundimg.jpeg

declared on the game.java source code.

it just happen that this code contains 6 classes...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.