hey all..i followed "thenewboston" tutorials in java for game development(3-7).I am having trouble in loading an image on the screen..i try this code:
bg = ImageIcon("C://TEST///Test.jpeg").getImage();
pic = ImageIcon("C://TEST///FACE.png").getImage();

this is the same code as his and i have made all the pictures in the TEST folder in c drive.
still i am getting and error(the code is underlined red).
i have included all the necessary files,But its still not working.
I am frustrated.

Please can sm1 guide me with a solution?

Thanks

Recommended Answers

All 5 Replies

the code is underlined in red. doesn't really tell us much.

what exactly are you trying to do, show an image in a Swing GUI?

Hi,
First, I am a beginner java programmer.
I see in the paths of the files first // and after that ///
I think that this can be wrong.

Forgive me if I am wrong.

Cheers.

Yes, the /// is definitely a mistake.

have you read the above remarks?

Be a part of the DaniWeb community

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