In Java creating a new BufferedImage for each frame of an animation is slow, but reusing images with transparency from frame to frame is tricky as BufferedImage doesn't have an obvious way to set all of it's pixels to completely transparent.
Unlike other colors we can't just paint a transparent color over the image because, well, it's transparent and won't affect the pixels already in the image.
I had a poke around and found this from IBM DeveloperWorks.
Rectangle2D.Double rect =
It would be a lot more useful if clearing to any color was part of the Image API, but until then this is good to know.