This is the solution:
public static void makeTransparent(BufferedImage img)
Graphics2D g = img.createGraphics();
g.fillRect(0, 0, img.getWidth(), img.getHeight());
Note how it keeps the composite local to the temporary Graphics2D object, as not to 'influence' the state of the Graphics instance you're using to render after you cleared the image.
Dang, I was just halfway through correcting @ra4king when you posted!
To be a pedant, I think you could just use -
The alpha value should be irrelevant from memory, and it saves allocating a composite - them nanoseconds can build up!