here is the complete answer to your question:
NOTE: I wrote this code based on a similar function found at
www.rgagnon.com, check them out they have a lot of useful source code
public Image makeAColorTransparent(Image image, final Color tColor){
ImageFilter filter = new RGBImageFilter(){
public final int filterRGB(int x, int y, int rgb){
if(rgb == tColor.getRGB()){
return 0x00FFFFFF & rgb;
}
else return rgb;
}
};
ImageProducer iProducer = new FilterImageSource(image.getSource(), filter);
return Toolkit.getDefaultToolkit().createImage(iProducer);
}