Formatted source code according to my local style
Class names start with a captial letter...
Added a package name
Ported main class from Applet to Swing