JDK-6732996 : VolIage not repainted properly when resizing the containing frame/canvas, Vista
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2008-08-02
  • Updated: 2011-01-19
  • Resolved: 2009-06-25
Related Reports
Duplicate :  
Description
I have a frame with a canvas. On the canvas, I am rendering a Volatile Image from within the paint method of the canvas. When resizing the frame outwards, the image is supposed to be resized to the new size of the canvas and the frame. But what I see is only a portion of the volatile image is painted on the frame and rest of the areas are just white. 

I reproduced it on jdk7-b28+ with Windows Vista Home Premium (Aero enabled) installed with Nvidia GeForce 8400M GS(laptop). I am not able to reproduce it on 6u10, 6 FCS releases. Hence it is a regression in jdk7. This painting issue does not happen when I use a swing container and JFrame instead of Frame + Canvas. This is reproducible with b33 PIT build as well.

Herewith I have attached the sample test. Run the sample test and you will see 2 rects. Resize the frame outward and see if the image is getting resized properly. If not, the bug is reproduced. I have also attached a screenshot.

Comments
EVALUATION Reproduced from b25 onwards. Fixed in b36 onwards. AWT integrated into both those builds, 2D into neither of those builds. I speculate that this was introduced by the b25 fix 6637796: setBounds doesn't enlarge Component and resolved by the b36 fix 6682046: Mixing code does not always recalculate shapes correctly when resizing components I'll close as a dup but reassign to the R/E for those bugs in case he has anything to add or correct.
25-06-2009