forked from MHdeveloper-solution/Calculator-java-Fx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
java Fx
54 lines (51 loc) · 2.9 KB
/
java Fx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<VBox alignment="CENTER" spacing="10.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.Controller">
<children>
<Label id="label_top" fx:id="ans" alignment="TOP_LEFT" text="0" />
<Label id="label_top" fx:id="ans1" alignment="TOP_LEFT" layoutX="134.0" layoutY="10.0" text="______________________" />
<VBox alignment="CENTER" spacing="10.0">
<children>
<HBox alignment="CENTER" spacing="5.0">
<children>
<Button id="btn-1" mnemonicParsing="false" onAction="#pressNum" text="1" />
<Button id="btn-2" mnemonicParsing="false" onAction="#pressNum" text="2" />
<Button id="btn-3" mnemonicParsing="false" onAction="#pressNum" text="3" />
<Button id="btn-a-1" mnemonicParsing="false" onAction="#pressAct" text="/" />
</children>
</HBox>
<HBox alignment="CENTER" spacing="5.0">
<children>
<Button id="btn-4" mnemonicParsing="false" onAction="#pressNum" text="4" />
<Button id="btn-5" mnemonicParsing="false" onAction="#pressNum" text="5" />
<Button id="btn-6" mnemonicParsing="false" onAction="#pressNum" text="6" />
<Button id="btn-a-2" mnemonicParsing="false" onAction="#pressAct" text="*" />
</children>
</HBox>
<HBox alignment="CENTER" spacing="5.0">
<children>
<Button id="btn-7" mnemonicParsing="false" onAction="#pressNum" text="7" />
<Button id="btn-8" mnemonicParsing="false" onAction="#pressNum" text="8" />
<Button id="btn-9" mnemonicParsing="false" onAction="#pressNum" text="9" />
<Button id="btn-a-3" mnemonicParsing="false" onAction="#pressAct" text="-" />
</children>
</HBox>
<HBox alignment="CENTER" spacing="5.0">
<children>
<Button id="btn-0" mnemonicParsing="false" onAction="#pressNum" text="0" />
<Button id="btn-c" mnemonicParsing="false" onAction="#clearAll" text="C" />
<Button id="btn-dot" mnemonicParsing="false" onAction="#pressNum" text="." />
<Button id="btn-a-4" mnemonicParsing="false" onAction="#pressAct" text="+" />
</children>
</HBox>
</children>
</VBox>
<Button id="btn_a_5" alignment="CENTER" mnemonicParsing="false" onAction="#pressEqual" prefHeight="25.0" prefWidth="104.0" text="=" textAlignment="CENTER" />
<Label text="Simple JavaFX Calculator created by Milton" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</VBox>