One way:
http://forum.arduino.cc/index.php?topic=230344.0
And, of course, you can run Processing on the PC and interface to the Arduino:
http://www.tinkerkit.com/processing/
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all
http://www.varesano.net/blog/fabio/serial-communication-arduino-and-processing-simple-examples-and-arduino-based-gamepad-int
and many more Internet references via Google.
Ray