• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Catching window expose event

When I move another windowA over windowB, things I draw on
WindowB will get erased.  How can I catch the "expose" event
on Window B so that I can redraw WindowB ?  Does it tell me
which part of WindowB are being exposed so I only redraw
that part ?
0
hori
Asked:
hori
1 Solution
 
russgoldCommented:
Unfortunately not.  It simply calls your paint() method whenever it wants to refresh any part of the component - and doesn't pass the visible area.  If you have a lot of computations, move them out of your paint method.  If you are using a lot of graphics overlaying each other, use an offscreen bitmap to minimize the redraw overhead.  Currently, that is the best you can do in Java.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now