This project is a fully functional Scientific Calculator built using Java Swing. It combines both standard and advanced mathematical capabilities with a sleek, user-friendly interface. It is ideal for students, professionals, and anyone looking for a reliable offline calculator application.
- Basic arithmetic operations:
+, -, Γ, Γ· - Scientific functions:
sin, cos, tan, ln, exp, β - Constants like
Οand support for exponentiation (^) - Full support for parentheses and nested expressions
- History panel to view previous calculations
- Toggle between Light Mode and Dark Mode
- Responsive, compact layout using
GridLayout - Real-time input and display formatting
- Custom button rendering and clean modern UI
The UI is divided into 3 main sections:
- Display Panel: Shows the current input and result
- Button Grid: Calculator keys arranged in a 7x4 grid layout
- History Log: Scrollable area to track past expressions and outputs
- Java - Core programming language
- Swing - For GUI design
- AWT - For basic event handling and graphics
To run this project locally:
- Ensure Java JDK 8 or later is installed
- Clone or download this repository
- Open the project in your IDE (Eclipse, IntelliJ, etc.)
- Run the
ScientificCalculator.javafile
sin(30) + cos(45)(2 + 3) * 4exp(2) + ln(10)β(25) + 3^2
From the menu bar, select View β Toggle Dark Mode to switch between themes. Button colors and display background adapt accordingly.