Simple 4 operation calculator with JavaFX
JavaFX, CSS
A very simple calculator, that can perform 4 basic operations:
The tool just shows a quick example on JavaFX MVC implementation. The content window is styled with a cascading stylesheet.
app: contains calculation related classes
main: contains the FXML for the layout, the Controller class and the Main class to start the application
res: contains the resource file for internalisation. As the application is not translated into other languages, this only serves to separate descriptions from layout, so that they are not hardcoded.
style: contains the CSS file to style the layout
Calculator Screen:
Negative numbers are understood by the calculator:
Once a calculation is done, the result becomes the first operand of the calculaltion and a new one can be initiated by clicking on one of the operands.