I tried to create another version.

Drag the block to the right (compress the spring) then release it.
Click Bar checkbox to show bar chart.

Click the following image to show the new version.
[eye]

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/springincline_pkg/springincline.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(1028.5kB):double click downloaded file to run it. (2 times by 1 users) , Download EJS source View EJS source
[/eye]