Yes, you can store images in a Hashtable.
But, ultimately, you must call createImage() in order to get an Image object.
You can combine multiple small images into one large on, call createImage() once, then draw portions of it using drawRegion().
Be aware that images take a lot of memory. Between two and four bytes per pixel, much more than the size of the PNG or JPEG file.
Depending on your file naming scheme, you can of course load images like:
PHP Code:
Image[] images = new Image[IMAGE_COUNT];
for (int i = 0; i < IMAGE_COUNT; i++) {
images[i] = Image.createImage("picture" + i + ".png");
// if there are many images, you might want some progress to the user
progressPercent = (i * 100) / IMAGE_COUNT;
repaint();
serviceRepaints();
}
Do you have a specific concern about this?
Cheers,
Graham.