S
Seref Arikan
Hi,
I am currently experimenting with java 2d, and my simple test program shows
odd behaviour (maybe my fault?).
I am using double buffering, and when i use drawimage to draw the offscreen
image to real screen, the image is drawn "over" the parent jscrollpane. The
GUI is structured like this: there is a jframe which contains a jscrollpane,
which contains a jpanel (actually a custom class that's inherited from
jpanel ). I am drawing on jPanel, and if i use setclip to copy only the
shape from offscreen image, the shape is drawn over scrollbars.
If i use getSubImage to take only a part of offscreen image, and NOT use
clipping for the jPanel, i don't have any problems, and i get rid of the
flickering.
So my question is, why setClip uses all area on screen, painting even on
parent control ? How do i avoid it ?
Best Regards
I am currently experimenting with java 2d, and my simple test program shows
odd behaviour (maybe my fault?).
I am using double buffering, and when i use drawimage to draw the offscreen
image to real screen, the image is drawn "over" the parent jscrollpane. The
GUI is structured like this: there is a jframe which contains a jscrollpane,
which contains a jpanel (actually a custom class that's inherited from
jpanel ). I am drawing on jPanel, and if i use setclip to copy only the
shape from offscreen image, the shape is drawn over scrollbars.
If i use getSubImage to take only a part of offscreen image, and NOT use
clipping for the jPanel, i don't have any problems, and i get rid of the
flickering.
So my question is, why setClip uses all area on screen, painting even on
parent control ? How do i avoid it ?
Best Regards