-
Bug
-
Resolution: Fixed
-
P2
-
6
I am extending JPanel and inside the paintComponent(), I am creating a LGP and RGP (only if they are null and not otherwise). I am filling half of a rectangle using LPG and other half using RGP. I have set a timer to repaint the JPanel every 30 ms.
I am seeing the following:
Some of the colors (say PINK) appear initially but later changes to a different color when the JPanel is repainted. In the given example, PINK changes to RED when the panel is repainted. This is seen/not seen in the following circumstances
1. This does not happen when I use SRGB ColorSpaceType. Happens only in Linear_RGB
2. This does not happen when I create the RGP, LGP everytime inside the paintComponent regardless of whether it is null or not.
3. Only when I repaint the panel, the color changes.
To reproduce, run the attached test and watch the PINK color. It changes to RED immediately after the panel is repainted.
This is reproducible on all platforms with the Mustang b81 2D PIT build (2006-04-16.mustang)
I am seeing the following:
Some of the colors (say PINK) appear initially but later changes to a different color when the JPanel is repainted. In the given example, PINK changes to RED when the panel is repainted. This is seen/not seen in the following circumstances
1. This does not happen when I use SRGB ColorSpaceType. Happens only in Linear_RGB
2. This does not happen when I create the RGP, LGP everytime inside the paintComponent regardless of whether it is null or not.
3. Only when I repaint the panel, the color changes.
To reproduce, run the attached test and watch the PINK color. It changes to RED immediately after the panel is repainted.
This is reproducible on all platforms with the Mustang b81 2D PIT build (2006-04-16.mustang)
- relates to
-
JDK-6417306 cache context-independent values in GradientPaint for improved performance
- Open