I have a Java application that creates a window using JFrame. When I move
another window over this to partially or completely occlude the JFrame, the
JFrame's contents are not redrawn. What do I need to do so the JFrame
redraws items that are no longer occluded?
Thanks.
Steve
A. Bolmarcich - 01 Dec 2003 04:27 GMT
> I have a Java application that creates a window using JFrame. When I move
> another window over this to partially or completely occlude the JFrame, the
> JFrame's contents are not redrawn. What do I need to do so the JFrame
> redraws items that are no longer occluded?
You should not need to do anything. The windowing system should send
a windowing system specific exposed event to the window. The
implementation of Java should process that event and generate a Java
event to update the region of the JFrame that has been exposed. Make
sure that the JFrame correctly updates and paints itself.
Chris Smith - 01 Dec 2003 18:33 GMT
> I have a Java application that creates a window using JFrame. When I move
> another window over this to partially or completely occlude the JFrame, the
> JFrame's contents are not redrawn. What do I need to do so the JFrame
> redraws items that are no longer occluded?
You need to review your implementation of paint (or paintComponent) to
ensure that it's correct and capable of fully repainting the window at
any time. You need to make sure that if you do painting outside of
paint (or paintComponent), that you understand that it's entirely
transient and could go away at any time with an appropriate paint event.
Sounds like you're not doing event-based painting properly.

Signature
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation