java.awt.Canvas is not painting immediately

wrostek
wrostek used Ask the Experts™
on
Hi *

I run under 1.4.0 and Win2000 .

My AWT frame has a Canvas in the center. Rezising the
window will not cause painting the Canvas area. I see
that paint() of the Canvas is called but no visible
result.
It needs a mouse move over the Canvas area to refresh
the correct content.
It seems somehow related to buffering coming with 1.4 .
Any idea?

Thanks in advance
Wolfgang R.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mick BarryJava Developer
Top Expert 2010

Commented:
Can you post some code that demonstarates the problem?

Author

Commented:
I've tried to make it stand-alone.
It seems not to be related to the canvas.
A simple AWT frame is showing well under the jdk
but not from within my Eclipse environment (not
running under debug). Here the frame remains tranparent
until the mouse is moved.
I assume it has something to do with my Samba network
mounts.

package test;
import java.awt.Frame;
public class CanvasFrame extends Frame {
     public CanvasFrame(String title)  {
          super(title);
          setSize(300, 300);
     }
     public static void main(String[] args) {
          CanvasFrame cf = new CanvasFrame("Demo");
          cf.setVisible(true);
     }
}
Ovi

Commented:
I don't see any canvas in your code, just a frame (AWT)
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

Author

Commented:
Ok, I just found the reason why.
It is caused by
http://developer.java.sun.com/developer/bugParade/bugs/4374079.html
Sorry for making you some work.
Regards
Wolfang R.
wrostek:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- PAQ'd and points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Venabili
EE Cleanup Volunteer
Force accepted

** Mindphaser - Community Support Moderator **

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial