wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Image Arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Image Arrays" Watch "Image Arrays" New topic
Author

Image Arrays

PM Knight
Greenhorn

Joined: Aug 17, 2004
Posts: 2
Hi
I'm trying to create an array of images, but am not sure how to go about it.

Any ideas???

Plus how would I specify the folder where the actual image was found on my computer?

Thanks in advance for any help!
John Melton
Ranch Hand

Joined: Aug 17, 2004
Posts: 49
If I am understanding your question right.... this is one possible solution (probably not the best, but the first one I thought of)
You could make a class called "Image.java" that might look something like this.

Then, you could just get an array of images since you made a new class of your own.
You might say somewhere in another class :


Somewhere you would have to write the code for what you wanted to do with the images. I am not sure what you wanted to do, but there are a lot of good pieces of code over in the code repository on java ranch and for bigger projects, check out Sourceforge


[url]www.jtmelton.com[/url]
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Or you could just use java.io.File.separator and not worry about all that horrid platform-dependent slishing and slashing.

Jules
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I'm trying to create an array of images, but am not sure how to go about it.

Any ideas???


Are you stuck on a particular part? Is working with images new for you? Is working with arrays new for you? Are you generally not sure where to get started?

You might like to make use of java.awt.Toolkit and java.awt.Image.

If you're not yet comfortable with arrays, I'd suggest taking a look at chapter 8 of David J. Eck's "Introduction to Programming Using Java" and chapters 46-49 of Bradley Kjell's "Introduction to Computer Science using Java".


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image Arrays
 
Similar Threads
error in dwonloading a pdf file
Get first frame of gif image
painting an image
Generating images
awt,swing