Loading images or sprites into an application.

Lets say I started out with a completely blank application.

How would I load an image into it so it appears when I run the program?

I’ve seen code to do it but they never explain how to get the image loaded into the program from the computer.

For example look here:

http://www.planetalia.com/cursos/Java-Invaders/JAVA-INVADERS-04.tutorial

How do I redirect the images location?
All help is appreciated.

That tutorial is perfect for what you’ve just asked.

What do you mean by “How do I redirect the images location?”? I don’t understand what you’re asking

I realize I’ve hit a mental road block hehe.

This is what I don’t understand:

How do I change the location of the image on my computer and change the url.

Like for instance, what if I have a file at the location:

c:\graphics\haha.gif

And I want to use that directory, instead of the other one.

How do I do that?

I’m trying to type in a bunch of stuff and its not working.

Have you tried reading the docs for ImageIO.read ???

Gives us some code on what you have tried. Otherwise we can’t really say what you are doing wrong. Keep in mind when you post a question to ALWAYS have enough information in the post so that people have a chance to answer.

And by the way. This should belong in the Newbies forum.

I finally figured it out, thanks anyway though.