I do not understand why
[quote]when I click on the earth, the motion of the moon stops and the moon fall on the earth [/quote]

I created a simulation as what I have interpreted what you need from figure 1 & 2.

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/planetmotionanalog_pkg/planetmotionanalog.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1358.1kB):double click downloaded file to run it. (25 times by 19 users) , Download EJS source (13 times by 9 users) View EJS source