Showing posts with label XORCocor. Show all posts
Showing posts with label XORCocor. Show all posts

Thursday, 27 February 2014

BASIC GRAPHICS IN JAVA WITH EXAMPLE

SETTING THE PAINT MODE

set drawing mode to XOR  example..........

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)