AlphaComposite not working!

I have a class called “Trail” in my game. In it I want to slowly make a texture more transparent to simulate a fade out. But using AlphaComposite doesn’t work and the obect just doesn’t gets rendered!

	private float alpha = 1;
	private float fade = .05f;

	public void update(){
		alpha -= fade;

	public void render(java.awt.Graphics2D graphics) {
		if (alpha > 0) {

	private AlphaComposite makeTransparent(float alpha) {
		return AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);

If I use this code with something like graphics.fillRect(…) it works perfectly, but it just doesn’t want to work with a BufferedImage!
PS: The update method get’s called 60 times a second and the render method as often as the CPU allows it. I’m sure that it’s a problem with this code snippet.

In my testing, it works fine. This suggests to me that this may be a problem with how you load the image, possibly? If it works fine with the fillRect, then my guess is that it has something to do with the underlying format of the BufferedImage. However, I tested, and it works fine for me too if I create the BufferedImage with Transparency.OPAQUE. Honestly, sorry this doesn’t help much, but I really don’t have a clue. Maybe provide more information, like where you load the image, etc.