this.image = createImage(new FilteredImageSource(tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT)));
if (zoomIndex == BASE_ZOOM_INDEX ){ image = createImage(new FilteredImageSource(tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT))); } else { image = getScaledImage(createImage(new FilteredImageSource(tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT)))); } graph.dispose(); tempImage.flush();
        public void prepare() {            // create image for buffer            Image tempImage;            Graphics graph;            try {                tempImage = createImage(bounds.width, bounds.height);                graph = tempImage.getGraphics();            } catch (NullPointerException ex) {                // argh!  but I want it!                return;            }            // fill with key color            graph.setColor(new Color(TRANSPARENT));            graph.fillRect(0, 0, bounds.width, bounds.height);            // draw entity image            graph.drawImage(tileManager.imageFor(entity), 0, 0, this);            // create final image            this.image = createImage(new FilteredImageSource(tempImage.getSource(),                    new KeyAlphaFilter(TRANSPARENT)));        }