An open API service indexing awesome lists of open source software.

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.

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:



  1. Ensure Java JDK 8 or later is installed

  2. Clone or download this repository

  3. Open the project in your IDE (Eclipse, IntelliJ, etc.)

  4. Run the ScientificCalculator.java file

๐Ÿ“‹ Example Expressions Supported



  • sin(30) + cos(45)

  • (2 + 3) * 4

  • exp(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.