Java Swing Calculator Tutorial
1. A four-function calculator with the following functions:
* Addition - adds two numbers: n1 + n2.
* Subtraction - subtracts number two from number one: n1 - n2.
* Multiplication - Multiplies two numbers: n1 * n2.
* Division - divides number two into number one: n1 / n2.
2. Used JButton for the numbers and functions.
3. Used Jmenu for File and help.
4. Created a class to respond to the events caused by numbers, functions, exit, help and about functionality.
5. Used BorderLayout to layout various components in the Calculator Frame. A BorderLayout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
Last edited by dr.nil : 15-10-2006 at 04:30 PM.
|Tags: calculator, java, swing, tutorial|
|Thread Tools||Search this Thread|
|Similar Threads for: "Java Swing Calculator Tutorial"|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Applets V/s Swing in JAVA||"Dritan"||Software Development||3||14-12-2010 09:04 AM|
|Java Swing and MySQL||shelton141||Software Development||1||22-09-2009 08:50 AM|
|drawPolygon in java Swing?||JagdishP||Software Development||3||07-08-2009 11:33 PM|
|Message Box example for Java Swing||Visala28||Software Development||3||31-07-2009 05:30 PM|
|Java swing help with repaint()||grudge||Software Development||4||23-07-2009 03:41 PM|