Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Last active October 1, 2019 13:26
Show Gist options
  • Save BMU-Verlag/57a12efbf72acce661c90be9b46c2f59 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/57a12efbf72acce661c90be9b46c2f59 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.GridPane?>
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" fx:id="body">
<Label fx:id="lastResult" text="Last Result" />
<Label fx:id="input" layoutY="80" />
<GridPane fx:id="numberField" layoutY="160">
<Button fx:id="one" text="1" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<Button fx:id="two" text="2" GridPane.columnIndex="1" GridPane.rowIndex="0" />
<Button fx:id="three" text="3" GridPane.columnIndex="2" GridPane.rowIndex="0" />
<Button fx:id="four" text="4" GridPane.columnIndex="0" GridPane.rowIndex="1" />
<Button fx:id="five" text="5" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Button fx:id="six" text="6" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Button fx:id="seven" text="7" GridPane.columnIndex="0" GridPane.rowIndex="2" />
<Button fx:id="eight" text="8" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Button fx:id="nine" text="9" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<Button fx:id="zero" text="0" GridPane.columnIndex="0" GridPane.rowIndex="3" />
<Button fx:id="comma" text="," GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Button fx:id="eval" text="=" GridPane.columnIndex="2" GridPane.rowIndex="3" />
<Button fx:id="add" text="+" GridPane.columnIndex="3" GridPane.rowIndex="0" />
<Button fx:id="substract" text="-" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<Button fx:id="multiply" text="*" GridPane.columnIndex="3" GridPane.rowIndex="2" />
<Button fx:id="divide" text="/" GridPane.columnIndex="3" GridPane.rowIndex="3" />
</GridPane>
</AnchorPane>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment