Solved

Catching window expose event

Posted on 1997-12-30
1
210 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
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
javap bin 2 41
Windows 10 IE Certificate Issue 10 51
MySQL  on Tomcat 8 70
Need help aligning JRadioButton that put in a box using GridBagLayout 2 19
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

829 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