Link to home
Start Free TrialLog in
Avatar of wrostek
wrostek

asked on

java.awt.Canvas is not painting immediately

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.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Can you post some code that demonstarates the problem?
Avatar of wrostek
wrostek

ASKER

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);
     }
}
I don't see any canvas in your code, just a frame (AWT)
Avatar of wrostek

ASKER

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.
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
ASKER CERTIFIED SOLUTION
Avatar of Mindphaser
Mindphaser

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial