A simple calculator application built in Java using Swing and IntelliJ IDEA.
This project demonstrates GUI development, event handling, and basic arithmetic logic.
The calculator provides a graphical interface that allows users to perform common arithmetic operations using on-screen buttons. All input is handled through button clicks, and results are displayed in a non-editable text field.
- Number input (0–9)
- Decimal support
- Basic operations: addition, subtraction, multiplication, division
- Modulo (
%) operation - Positive/negative toggle
- Clear and delete functionality
- Chained calculations
- Java
- Swing (JFrame, JPanel, JButton, JTextField)
- ActionListener for event handling
- IntelliJ IDEA
- The application window is created using a
JFrame - Buttons are organized in a grid layout
- User interactions are handled through the
ActionListenerinterface - Arithmetic operations are performed using
doublevalues to support decimals
- Open the project in IntelliJ IDEA
- Run the
Calculatorclass - Use the on-screen buttons to perform calculations
This project was created to practice:
- Java GUI development
- Event-driven programming
- Object-oriented design concepts
- Git/GitHub project workflow