If you are interested in java programming, then I will suggest you write java code by yourself.
However, if you are interested in science and modeling, it will be easier and more effective to use EJS. :-)
Check EJS web site and find out information about it. I have created many flash videos with step by step instruction to show new users how to use EJS to generate new simulations. However, it is displayed in Chinese interface. Sorry!