I recently added some gradient fill areas, just to polish up some interfaces. In cases where I was filling with translucent colors (Color objects created with alpha value), Java 6 runtime will fill the area with the proper gradient, and the area is translucent, as expected. Running the same code (compiled with Java 6) in a Java 7 runtime (on the same platform) behaves differently. The alpha-gradient areas are not transparent at all.
It appears that Java 7 will not honor the alpha byte of the Color objects when performing a GradientPaint fill. I’ve only tested this in Ubuntu, with Sun/Oracle Java runtimes.
I have not found any articles or bugs reported on this. I’m not well-versed in gradient painting, so can anyone clarify if this is a known issue (or if I’m doing it wrong)? I should code up a simple test case to demonstrate.
The quick work-around was to remove any alpha bytes from my gradient areas, so they paint consistently.