Are you asking for help with the Processing code? Processing has its own forum at http://forum.processing.org/.
All the Arduino code will be doing is sending the result of the analogRead(), over serial, to Processing.
I can't come up with the code..
Which code? The Arduino side is trivial, analogRead(), then Serial.write() or Serial.print(). Ask at Processing's forum for that side.