https://github.com/1810suman/scientific_calculator
A Java Swing-based scientific calculator with custom UI, dark mode, history log, and support for advanced functions, expression parsing, constants, and parentheses evaluation.
https://github.com/1810suman/scientific_calculator
arithmetic-operations java javaswing scientificcalculator
Last synced: 2 months ago
JSON representation
A Java Swing-based scientific calculator with custom UI, dark mode, history log, and support for advanced functions, expression parsing, constants, and parentheses evaluation.
- Host: GitHub
- URL: https://github.com/1810suman/scientific_calculator
- Owner: 1810suman
- Created: 2025-04-05T10:33:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T11:07:40.000Z (about 1 year ago)
- Last Synced: 2025-04-05T11:29:51.398Z (about 1 year ago)
- Topics: arithmetic-operations, java, javaswing, scientificcalculator
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
๐ข Scientific Calculator
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.
๐ Key Features
- 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
๐ผ๏ธ User Interface
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
๐ ๏ธ Technologies Used
-
Java - Core programming language -
Swing - For GUI design -
AWT - For basic event handling and graphics
๐ Getting Started
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
๐ Example Expressions Supported
sin(30) + cos(45)(2 + 3) * 4exp(2) + ln(10)โ(25) + 3^2
๐จ Dark Mode
From the menu bar, select View โ Toggle Dark Mode to switch between themes.
Button colors and display background adapt accordingly.