if (imageCache.get(key) == img) { imageCache.remove(key); return;
for (int i = 0; i < img.length; ++i) { if (imageCache.get(key) == img[i]) { imageCache.remove(key); }
    public void removeImage(Object id) {    	//System.out.println(name+".removeImage(Object): " + id);        // This operation is siginificantly slower now that 'images' stores        // images directly instead of storing hashes.  Fortunately this        // operation is also extremely rare.        Image img = (Image)images.get(id);        images.remove(id);        for (Enumeration e = imageCache.keys(); e.hasMoreElements();) {          Object key = e.nextElement();          if (imageCache.get(key) == img) {            imageCache.remove(key);            return;          }        }    }