Advertisement
zed_com

Calculator Sample.fxml 2021

May 8th, 2021
1,103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.67 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <?import javafx.scene.control.Button?>
  4. <?import javafx.scene.control.Label?>
  5. <?import javafx.scene.layout.AnchorPane?>
  6. <?import javafx.scene.layout.ColumnConstraints?>
  7. <?import javafx.scene.layout.GridPane?>
  8. <?import javafx.scene.layout.RowConstraints?>
  9. <?import javafx.scene.layout.VBox?>
  10. <?import javafx.scene.text.Font?>
  11.  
  12. <VBox minHeight="-Infinity" minWidth="-Infinity" prefHeight="329.0" prefWidth="250.0"
  13.      xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.Controller">
  14.     <children>
  15.         <AnchorPane prefHeight="361.0" prefWidth="250.0">
  16.             <children>
  17.                 <GridPane alignment="TOP_CENTER" hgap="5" layoutX="18" layoutY="110" prefHeight="200.0"
  18.                          prefWidth="200.0" vgap="5">
  19.                     <columnConstraints>
  20.                         <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="70"/>
  21.                         <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="60"/>
  22.                         <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="100"/>
  23.                         <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="100"/>
  24.                     </columnConstraints>
  25.                     <rowConstraints>
  26.                         <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
  27.                         <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
  28.                         <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
  29.                         <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
  30.                     </rowConstraints>
  31.                     <children>
  32.                         <Button mnemonicParsing="false" onAction="#button_number_click" prefHeight="48" prefWidth="50"
  33.                                text="7">
  34.                             <font>
  35.                                 <Font name="System Bold Italic" size="22"/>
  36.                             </font>
  37.                         </Button>
  38.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="8"
  39.                                onAction="#button_number_click" GridPane.columnIndex="1">
  40.                             <font>
  41.                                 <Font name="System Bold Italic" size="22"/>
  42.                             </font>
  43.                         </Button>
  44.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="9"
  45.                                onAction="#button_number_click" GridPane.columnIndex="2">
  46.                             <font>
  47.                                 <Font name="System Bold Italic" size="22"/>
  48.                             </font>
  49.                         </Button>
  50.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="/"
  51.                                 onAction="#button_div_click"
  52.                                GridPane.columnIndex="3">
  53.                             <font>
  54.                                 <Font name="System Bold Italic" size="22"/>
  55.                             </font>
  56.                         </Button>
  57.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="4"
  58.                                onAction="#button_number_click" GridPane.rowIndex="1">
  59.                             <font>
  60.                                 <Font name="System Bold Italic" size="22"/>
  61.                             </font>
  62.                         </Button>
  63.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="5"
  64.                                onAction="#button_number_click" GridPane.columnIndex="1" GridPane.rowIndex="1">
  65.                             <font>
  66.                                 <Font name="System Bold Italic" size="22"/>
  67.                             </font>
  68.                         </Button>
  69.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="6" onAction="#button_number_click" GridPane.columnIndex="2"
  70.                                GridPane.rowIndex="1">
  71.                             <font>
  72.                                 <Font name="System Bold Italic" size="22"/>
  73.                             </font>
  74.                         </Button>
  75.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="*" onAction="#button_mul_click" GridPane.columnIndex="3"
  76.                                GridPane.rowIndex="1">
  77.                             <font>
  78.                                 <Font name="System Bold Italic" size="22"/>
  79.                             </font>
  80.                         </Button>
  81.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="1" onAction="#button_number_click" GridPane.rowIndex="2">
  82.                             <font>
  83.                                 <Font name="System Bold Italic" size="22"/>
  84.                             </font>
  85.                         </Button>
  86.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="2" onAction="#button_number_click" GridPane.columnIndex="1"
  87.                                GridPane.rowIndex="2">
  88.                             <font>
  89.                                 <Font name="System Bold Italic" size="22"/>
  90.                             </font>
  91.                         </Button>
  92.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="3" onAction="#button_number_click" GridPane.columnIndex="2"
  93.                                GridPane.rowIndex="2">
  94.                             <font>
  95.                                 <Font name="System Bold Italic" size="22"/>
  96.                             </font>
  97.                         </Button>
  98.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="-" onAction="#button_min_click" GridPane.columnIndex="3"
  99.                                GridPane.rowIndex="2">
  100.                             <font>
  101.                                 <Font name="System Bold Italic" size="22"/>
  102.                             </font>
  103.                         </Button>
  104.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="." onAction="#button_number_click" GridPane.rowIndex="3">
  105.                             <font>
  106.                                 <Font name="System Bold Italic" size="22"/>
  107.                             </font>
  108.                         </Button>
  109.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="0" onAction="#button_number_click" GridPane.columnIndex="1"
  110.                                GridPane.rowIndex="3">
  111.                             <font>
  112.                                 <Font name="System Bold Italic" size="22"/>
  113.                             </font>
  114.                         </Button>
  115.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="=" onAction="#button_rez_click" GridPane.columnIndex="2"
  116.                                GridPane.rowIndex="3">
  117.                             <font>
  118.                                 <Font name="System Bold Italic" size="22"/>
  119.                             </font>
  120.                         </Button>
  121.                         <Button mnemonicParsing="false" prefHeight="48" prefWidth="50" text="+" onAction="#button_plus_click" GridPane.columnIndex="3"
  122.                                GridPane.rowIndex="3">
  123.                             <font>
  124.                                 <Font name="System Bold Italic" size="22"/>
  125.                             </font>
  126.                         </Button>
  127.                     </children>
  128.                 </GridPane>
  129.                 <Button fx:id="button_clear" layoutX="171" layoutY="48" mnemonicParsing="false" prefHeight="54"
  130.                        prefWidth="62.0" text="C" onAction="#button_Clear_click">
  131.                     <font>
  132.                         <Font name="System Bold" size="25"/>
  133.                     </font>
  134.                 </Button>
  135.                 <Label fx:id="label_rez" layoutX="18" layoutY="50" prefHeight="54" prefWidth="146">
  136.                     <font>
  137.                         <Font size="22"/>
  138.                     </font>
  139.                 </Label>
  140.                 <Label fx:id="label_top" layoutX="14" layoutY="14" prefHeight="29" prefWidth="215">
  141.                     <font>
  142.                         <Font size="15"/>
  143.                     </font>
  144.                 </Label>
  145.             </children>
  146.         </AnchorPane>
  147.     </children>
  148. </VBox>
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement