JavaFx fxml Кнопка не отображается в GridPane - PullRequest
0 голосов
/ 03 мая 2018

Я пытаюсь это долго. Это мой код Fxml. Когда я запускаю приложение JavaFx с этим Fxml, кнопка нигде не появляется. Что я делаю неправильно?

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.chart.CategoryAxis?>
<?import javafx.scene.chart.LineChart?>
<?import javafx.scene.chart.NumberAxis?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>

<VBox prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1">
      <children>
        <GridPane maxHeight="-1.0" maxWidth="-1.0" mouseTransparent="true" prefHeight="800.0" prefWidth="800.0" VBox.vgrow="ALWAYS">
          <children>
          <HBox spacing="10" alignment="bottom_right"  GridPane.columnIndex="0" GridPane.rowIndex="0"
        >
        <Button text="Sign In"     
        onAction="#handleCreateNewCarButtonAction"/>
</HBox>

                <Text fontSmoothingType="LCD" layoutX="17.0" layoutY="53.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Name = Auto Bezeichnung, FL = Corner Weight FL, FR = Corner Weight FR, RL = Corner Weight RL, RR = Corner Weight RR, sAC_C = Corner Weight FL, sAC_B = Slip Angle Coefficient B,  sAC_E = Slip Angle Coefficient E, LC_KA = Load Coefficient KA, LC_KB =  Load Coefficient KB, Delete = Auto entfernen, Show = Auto im Chart anzeigen" wrappingWidth="622.7230573003446">
               <font>
                  <Font name="Arial Nova Light" size="12.0" />
               </font></Text>
                <LineChart alternativeColumnFillVisible="true" layoutX="648.0" layoutY="98.0" prefHeight="455.0" prefWidth="578.0" title="Car Chart" GridPane.columnIndex="2" GridPane.rowIndex="1">
                  <xAxis>
                    <CategoryAxis side="BOTTOM" />
                  </xAxis>
                  <yAxis>
                    <NumberAxis side="LEFT" />
                  </yAxis>
                </LineChart>
                <TableView layoutX="20.0" layoutY="126.0" prefHeight="403.0" prefWidth="615.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
                  <columns>

                  </columns>
                </TableView>
          </children>
        </GridPane>
      </children>
    </VBox>
<TableView >
  <columns>
    <TableColumn prefWidth="50.0" text="Name" />
    <TableColumn prefWidth="50.0" text="FL" />
      <TableColumn prefWidth="50.0" text="FR" />
      <TableColumn prefWidth="50.0" text="RL" />
      <TableColumn prefWidth="50.0" text="RR" />
      <TableColumn prefWidth="50.0" text="sAC_C" />
      <TableColumn prefWidth="50.0" text="sAC_B" />
      <TableColumn prefWidth="50.0" text="sAC_E" />
      <TableColumn prefWidth="50.0" text="LC_KA" />
      <TableColumn prefWidth="50.0" text="LC_KB" />
      <TableColumn prefWidth="50.0" text="Delete" />
      <TableColumn prefWidth="50.0" text="Show" />
  </columns>
</TableView>
...