Seems to me you are really beginning with this. I will try to help.
You need to have one sketch (program) for Arduino and another for your computer in Processing (you have chosen Processing it could be another language). Two different sketches that will work together to do what you want. Processing and Arduino IDE are very similar; but still 2 different things.
in Processing you need to have a void draw() function for it to run in a loop, otherwise blank screen and no program running. You need to study Processing here:http://processing.org/
I don't know what you are doing; but seems like a good starter project that will help you learn many good things. In order to give you more specific advise you need to study some Processing on your own first and come up with some sketch for you to understand what it is all about. You will find help here.