from: http://java.about.com/od/Handling-Events/ss/Simple-Calculator-Example-Program.htm