Added code for a swing gui and updated javadoc