[an error occurred while processing this directive]
Domain for sale!
Start Search Contents Index Links About

My Calculator

GUI and general programming

2002 - Week 33 - Havard Rast Blok

This week we will make a small calculator. It will feature a simple GUI and recognize the four common arithmetics.

Since this is a rather small application, it is wise start with the GUI this time, to have something to continue building the rest of the program on. Below is a suggested layout. I have used the GUI editor of Netbeans this time, and will not publish that code. The GUI of the next examples are programmed.

When the GUI is done, it is time for some action. Every button must have an ActionListener and there must be some computing going on. Do not waste time on little details yet, but get the basic functions to work.


Calculator.java

If you are still keen on making an advanced calculator, feel free to go head. Some suggestions for features: sinus, co-sinus and tangent calculations, conversion between different radixes, memory buttons or evaluation of parenthesis.



site: Håvard Rast Blok
mail:
updated: 16 July 2010