I just upload the source code as attachment for the first posted message.
shm.java is the code for the applet, spring.java is the code for drawing the spring.