It was not written directly with java. I create it with a tool called [url=]Easy Java Simulation[/url]

It is actually a java code generator. It is for people who is not so familiar with java but has strong background in physics/science.
You just define variables/ write equations to exppress relation between variables and equations to indicate how variables change with time. EJS will generate the java code for you. It also has graphic user interface so you can drag and drop graphic elements to create the view.
You can download the EJS source and find out how I did it(You will need to download and install EJS). You can also modify it and generate new code.

If you just want to see how it look like click "load ejs as signed applet" and allow browser to load EJS into your browser. You will be able to run EJS within browser, find out the model, moify it and generate new simulation.