SETTING THE PAINT MODE
set drawing mode to XOR example..........
PAINTING MODE:
PAINTING MODE:
There are two painting or drawing modes for the Graphics class:- paint mode which is the default mode and XOR mode. In paint mode, anything we draw replaces whatever is already on the screen i.e. it overwrites any preexisting contents. If you draw a green circle, you get a green circle, no matter what was underneath.The paint mode determines how objects are drawn in a window. It is possible to have new objects XORed on to the window by using setXORMode().
Syntax
void setXORMode(Color XORColor)
void setXORMode(Color XORColor)