Anurag’s हिसाब यन्त्र
हिसाब यन्त्र is a desktop application which is implemented in Java Platform. It ,a calculator with basic functionalities, is developed using Java Swing graphical user interface (GUI) toolkit. It supports four basic operations addition, subtraction multiplication, and division.
हिसाब यन्त्र is a JAVA application so it requires followings to run properly
- a JAVA runtime environment installed on your system
You can clone the project and compile yourself.
If you prefer a jar file then click Download.
हिसाब यन्त्र is very user friendly and intuitive and uses a GUI interface implemented in JAVA to communicate with user.
Fig. हिसाब यन्त्र
The features of हिसाब यन्त्र are:
- Two way input: You can input from both buttons on the screen as well as from your keyboard.
- Operations: You can do addition, subtraction, multiplication, division, power and precentage.
- Shortcuts: ESC clears the input field and RETURN evaluates the expression in the field.
- Auto-remove invalid characters: It automatically removes invalid characters such as alphabets, other special symbols etc.
- Opens Under Mouse Pointer: The window opens where the pointer of your mouse lies on the screen.
- Pop-Up Message: If the entered expression is wrong then a message pop-ups saying your expression is wrong.
The future goals for this project are:
- Bracket completion
- Enable use of trigonometric ratios
For further documentation view Javadoc.
You can create a calculator by making the object of Calculator
Calculator calc = new Calculator(); // initializes calculator
It initializes the calculator and its components.
Now to pack those components call pack()
calc.pack(); // packs components to the frame
Then to make calculator visible call show()
calc.show(); // display the calculator
If you want to add some text in the footer you can use setFooterText(text)
Here text
is an argument of type text which you want to put in footer.
calc.setFooterText("This is footer text"); // sets footer text
Use this method before packing