Hello, I wrote an Image handler to read in images and then displace them appropriately. I cannot get it to work though.
public BufferedImage getImage(String key){
for(String str : images.keySet()){
if(str == key){
System.out.println("Found " + key);
return images.get(key);
}
}
//if not found
System.out.println("Not Found " + key);
return images.get("error");
}
images is a hashmap of images with a string for the key. When I run it, I always get the error image and I checked my spelling and the .txt file, and it is reading in the images. Thanks for any help.