Simple GUI Calculator using Java
A simple graphical calculator built using Java's Swing library. This application allows basic arithmetic operations such as addition, subtraction, multiplication, division, percentage, and backspace. It also handles decimal numbers and includes a clear button to reset the calculator.
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)
- Percentage (%)
- Clear (C)
- Backspace (B)
- Decimal point (.)
- Numeric input (0-9)
- Java 8 or later
- Any Java IDE (e.g., Eclipse, IntelliJ IDEA) or a text editor with the JDK installed
- Clone this repository to your local machine using the following command:
git clone https://github.com/yourusername/calculator.git
- Navigate to the project directory:
cd calculator javac clac.java java clac
- Click on the buttons for digits (0-9) to input numbers.
- Use the arithmetic operation buttons (+, -, *, /, %) to perform calculations.
- Press C to clear the input field.
- Press B to remove the last character.
- The = button will display the result of the calculation.