LED’s blinking according to coordinates of mouse

This is the experimental set-up I tried using Processing inheriting Arduino Libraries. Objective I wanted to do was to make red and blue coloured LED’s to blink according to the location of mouse’s X- coordinate is whether even or odd when clicked. i.e. When Mouse’s X-coordinate is even Red coloured LED blinks and when it is odd Blue Coloured LED will blink while clicking it including making different sized ellipse on the screen according to clicks.
hardware setting was nothing that hard, just two LEDs connected to pin 13 and pin 12 of arduino. Thats it.

Rest programming in Processing was as following:-

import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int ledPin1 = 13;
int ledPin2 = 12;
void setup(){
arduino = new Arduino(this, Arduino.list()[0],57600);
arduino.pinMode(ledPin1, Arduino.OUTPUT);
arduino.pinMode(ledPin2, Arduino.OUTPUT);
size(400,400);
background(0);
frameRate(15);
}
void draw(){
color c = color(200,0,0);
if(mousePressed == true){
fill(c, 150);
if(mouseX % 2 == 0){
fill(255,255,0);
ellipse(mouseX,mouseY,25,25);
arduino.digitalWrite(ledPin1, Arduino.HIGH);
delay(20000);}
arduino.digitalWrite(ledPin1,Arduino.LOW);
if(mouseX % 2 == 1){
ellipse(mouseX,mouseY,40,40);
arduino.digitalWrite(ledPin2, Arduino.HIGH);
delay(10000);}
arduino.digitalWrite(ledPin2, Arduino.LOW);
}
else{
fill(0);}
}

Processing using Arduino

Processing is an awesome library for interactive designers. I was reading stuff about it from last 1 month and after trying its example got an idea to implement after synchronising Arduino and processing and outcome was more awesome.
I synchronised arduino with processing library by following this link.