You can move the balls around and adjust the variables you see on screen, and then hit play to see how it affects the orbits.
I used Newton's Law of Universal gravitation to make this (Force = (mass1*mass2)/(distance)^2.