How to distinglish causes of Repaint events
Posted on 1998-01-02
Does anybody know within the callback method
"paint(Graphics)", how can we distinglish between whether it
a) Caused by component movement (e.g. when I drag a
component over other components)
b) Caused by window exposure (e.g. when I drag another
window over my applet)
For yr background information, I need to distinglish
them and handle in a different way in order to support drag
& drop of components in my applet.
In the moving component in case (a), I need to erase the
current location before I draw and on a new location. I
also use myGraphics.setXORMode(..) to ensure it doesn't
erase its path.
In case (b), I just erase the whole applet and redraw it.