I'm stuck with Swing repaint management. I would like to blur the background of a component. I use a BufferedImage to capture and blur stuff covered by my component. On paintComponent() I paint the blured image as background.
Everything works fine if the component is repainted entirely but I cannot overcome problems in the following scenario:
- A component is covered by my component but does not overlap completely
- Before the repaint is executed, a clip (subregion covering the occluded component) is set by the RepaintManager restricting changes to the graphics object
- setting/clearing a user clip always intersects with this clip region
- creating a new graphics object is always a copy or intersects this clip region
- Because the image I want to paint is blured, I have to draw pixels outside the clip set by the RepaintManager
How can I make sure that the component can paint all of its pixels on paintComponent() regardless of the clip set by the RepaintManager?
Help is much appreciated.
Thanks for help in advance.