This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
You don't want to use the text field in your main method. You ought to be creating an arithmetic class, which takes the values from the text fields, and does the calculations. That is the "M" part of MVC. The frame and text boxes which display the numbers are the "V" part and the buttons the "C" part.
Obviously your data in the database also form part of the "M". But you appear to be running the two independently of each other. Why?
Joined: Jun 22, 2009
Thank you. I got it
Joined: Oct 13, 2005
Well done Please explain the solution, in case anybody else has a similar problem in the future.