我正在使用JavaFX SceneBuilder创建FXML。
我的窗口只是BorderPane:宽度为800,高度为625.
顶部是MenuBar:width use_computed_size,height 25.
它完全适合SceneBuilder,但是当我作为Java应用程序运行时,右边和底部都有这样的空格:
请帮忙删除它,抱歉我是JavaFx的新手
更新:我已将其分为2个布局,然后是RootLayout setCenter MainLayout,但它也不起作用。
RootLayout.fxml:
"INSERT INTO tb_finalpay_detail (cooploanID) INNER JOIN tb_finalpay ON tb_finalpay_detail.fpayID = tb_finalpay.fpayID
(SELECT cooploanID FROM tb_cooploan_master INNER JOIN tb_finalpay ON tb_cooploan_master.coopmemID = tb_finalpay.coopmemID
WHERE coopmemID='$coopmemID')";
MainLayout.fxml:
<BorderPane prefHeight="625.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.chotoxautinh.controller.RootController">
<top>
<MenuBar prefHeight="25.0" prefWidth="800.0" BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
</BorderPane>