Draw a circle by left-clicking. Erase by right-clicking. Clear the screen with a middle click.

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Code void setup() { size(200,200); background(0); } void draw() { if (mousePressed) { if (mouseButton == LEFT) { stroke(255); fill(128); ellipse(mouseX,mouseY,20,20); } else if (mouseButton == RIGHT) { stroke(0); fill(0); ellipse(mouseX,mouseY,20,20); } else if (mouseButton == CENTER) { background(0); } } }