Solved

Catching window expose event

Posted on 1997-12-30
1
215 Views
Last Modified: 2008-02-07
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
Comment
Question by:hori
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
russgold earned 100 total points
ID: 1231888
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

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question