2016-09-16 151 views
0

如何将AnchorPane绑定到屏幕大小?使anchorpane可调整大小与屏幕大小

当我运行我的代码它让我发现:

enter image description here

但是当主舞台适应屏幕的AnchorPane仍然具有相同的尺寸。

enter image description here

这里是我的FXML文件

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

<?import javafx.scene.text.*?> 
<?import javafx.geometry.*?> 
<?import java.lang.*?> 
<?import java.util.*?> 
<?import javafx.scene.*?> 
<?import javafx.scene.control.*?> 
<?import javafx.scene.layout.*?> 

<AnchorPane id="AnchorPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="768.0" prefWidth="1024.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sanad.Entry_Page"> 
    <children> 
     <Pane blendMode="RED" layoutX="563.0" layoutY="9.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefHeight="746.0" prefWidth="447.0"> 
     <padding> 
      <Insets top="10.0" /> 
     </padding> 
     <children> 
      <SplitPane dividerPositions="0.5720620842572062" layoutX="-56.0" layoutY="-1.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="741.0" prefWidth="508.0"> 
       <items> 
       <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="751.0" prefWidth="286.0"> 
        <children> 
         <TextField fx:id="formnumer_field" layoutX="8.0" layoutY="14.0" prefHeight="30.0" prefWidth="235.0" /> 
         <TextField fx:id="sectornumber_field" layoutX="8.0" layoutY="48.0" prefHeight="30.0" prefWidth="235.0" /> 
         <TextField fx:id="fathername_field" layoutX="8.0" layoutY="82.0" prefHeight="30.0" prefWidth="235.0" /> 
         <ComboBox fx:id="fatherborn_year" layoutX="8.0" layoutY="116.0" prefHeight="25.0" prefWidth="70.0" /> 
         <ComboBox fx:id="fatherborn_month" layoutX="85.0" layoutY="116.0" prefHeight="25.0" prefWidth="70.0" /> 
         <ComboBox fx:id="fatherborn_day" layoutX="162.0" layoutY="116.0" prefHeight="25.0" prefWidth="80.0" /> 
         <TextField fx:id="fathercurrentjob" layoutX="8.0" layoutY="145.0" prefHeight="30.0" prefWidth="235.0" /> 
         <TextField fx:id="fatherprevjob" layoutX="8.0" layoutY="179.0" prefHeight="30.0" prefWidth="235.0" /> 
         <TextField fx:id="mothername_field" layoutX="8.0" layoutY="215.0" prefHeight="30.0" prefWidth="235.0" /> 
         <TextField fx:id="mother_curr_job" layoutX="8.0" layoutY="278.0" prefHeight="30.0" prefWidth="235.0" /> 
         <ComboBox fx:id="motherborn_day" layoutX="162.0" layoutY="249.0" prefHeight="25.0" prefWidth="80.0" /> 
         <ComboBox fx:id="motherborn_year" layoutX="8.0" layoutY="249.0" prefHeight="25.0" prefWidth="70.0" /> 
         <TextField fx:id="mother_prev_job" layoutX="8.0" layoutY="312.0" prefHeight="30.0" prefWidth="235.0" /> 
         <ComboBox fx:id="motherborn_month" layoutX="85.0" layoutY="249.0" prefHeight="25.0" prefWidth="70.0" /> 
         <TextField fx:id="homepartner_num" layoutX="8.0" layoutY="346.0" prefHeight="30.0" prefWidth="235.0" /> 
         <ComboBox fx:id="homepartner_year" layoutX="11.0" layoutY="382.0" prefHeight="25.0" prefWidth="70.0" /> 
         <ComboBox fx:id="homepartner_month" layoutX="88.0" layoutY="382.0" prefHeight="25.0" prefWidth="70.0" /> 
         <ComboBox fx:id="homepartner_day" layoutX="163.0" layoutY="382.0" prefHeight="25.0" prefWidth="80.0" /> 
         <ComboBox fx:id="homepartner_name" layoutX="8.0" layoutY="416.0" prefHeight="30.0" prefWidth="235.0" /> 
         <CheckBox fx:id="homepartner_gender1" layoutX="141.0" layoutY="456.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="100.0" text="ذكر"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </CheckBox> 
         <CheckBox fx:id="homepartner_gender2" layoutX="8.0" layoutY="456.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="100.0" text="أنثى"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </CheckBox> 
         <Label fx:id="current_cityaa" alignment="CENTER" layoutX="141.0" layoutY="490.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="المحافظة"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
         <TextField fx:id="current_city" layoutX="8.0" layoutY="490.0" prefHeight="30.0" prefWidth="120.0" /> 
         <Label fx:id="current_cityaa1" alignment="CENTER" layoutX="141.0" layoutY="530.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="الحي"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
         <TextField fx:id="current_suberb" layoutX="8.0" layoutY="530.0" prefHeight="30.0" prefWidth="120.0" /> 
         <TextField fx:id="prev_suberb" layoutX="11.0" layoutY="615.0" prefHeight="30.0" prefWidth="120.0" /> 
         <Label fx:id="current_cityaa11" alignment="CENTER" layoutX="144.0" layoutY="615.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="الحي"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
         <Label fx:id="current_cityaa2" alignment="CENTER" layoutX="144.0" layoutY="575.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="المحافظة"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
         <TextField fx:id="prev_city" layoutX="11.0" layoutY="575.0" prefHeight="30.0" prefWidth="120.0" /> 
        </children> 
        </AnchorPane> 
       <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0"> 
        <children> 
         <Label fx:id="formnumber" contentDisplay="RIGHT" layoutX="8.0" layoutY="14.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="رقم الاستمارة" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
         <Label fx:id="sectornumber" contentDisplay="RIGHT" layoutX="8.0" layoutY="48.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="رقم القطاع" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="fathername" contentDisplay="RIGHT" layoutX="8.0" layoutY="82.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="اسم الأب" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="fatherborn" contentDisplay="RIGHT" layoutX="20.0" layoutY="112.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="المواليد" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="currentjob" contentDisplay="RIGHT" layoutX="20.0" layoutY="142.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل الحالي" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="previousjob" contentDisplay="RIGHT" layoutX="20.0" layoutY="172.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل السابق" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="fatherborn1" contentDisplay="RIGHT" layoutX="20.0" layoutY="244.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="المواليد" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="currentjob1" contentDisplay="RIGHT" layoutX="20.0" layoutY="278.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل الحالي" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="fathername1" contentDisplay="RIGHT" layoutX="8.0" layoutY="208.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="اسم الأم" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="previousjob1" contentDisplay="RIGHT" layoutX="20.0" layoutY="307.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل السابق" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="homepartner_sex" contentDisplay="RIGHT" layoutX="20.0" layoutY="451.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="الجنس" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="homepartner_name" contentDisplay="RIGHT" layoutX="20.0" layoutY="414.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="الاسم" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="partner_born" contentDisplay="RIGHT" layoutX="20.0" layoutY="378.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="الميلاد" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label fx:id="home_partner" contentDisplay="RIGHT" layoutX="8.0" layoutY="341.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="عدد المستضافين" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
          <padding> 
           <Insets left="50.0" /> 
          </padding> 
         </Label> 
         <Label alignment="CENTER" layoutX="8.0" layoutY="485.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="175.0" text="السكن الحالي"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
         <Label alignment="CENTER" layoutX="8.0" layoutY="570.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="175.0" text="السكن الحالي"> 
          <font> 
           <Font size="14.0" /> 
          </font> 
         </Label> 
        </children> 
        </AnchorPane> 
       </items> 
      </SplitPane> 
     </children> 
     </Pane> 
     <SplitPane dividerPositions="0.4845360824742268" layoutX="8.0" layoutY="8.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="741.0" prefWidth="487.0"> 
     <items> 
      <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0" /> 
      <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="100.0" /> 
     </items> 
     </SplitPane> 
    </children> 
</AnchorPane> 
+0

尝试起飞优选宽度和高度为AnchorPane。如果可能的话,它将调整到这些规格。 –

+0

我不完全明白,是否希望锚窗格填充整个窗口,或窗口匹配屏幕大小,或锚窗格的大小匹配屏幕,无论窗口大小?从你的图片中,东西看起来对我来说很好 – Gikkman

+0

当程序处于全屏模式时,他正试图让窗格调整大小。我不知道该怎么做。我一直在摆弄它,没有做任何事情。其他有经验的人可以帮助你。 –

回答

0

这可以使用AnchorPane的这个属性来完成:

AnchorPane.bottomAnchor 
AnchorPane.leftAnchor 
AnchorPane.rightAnchor 
AnchorPane.topAnchor 

但是,你需要决定什么是场景的一部分会改变的,哪些不是。固定部分的宽度用prefWidth固定。 ha部分修复AnchorPane.leftAnchor或AnchorPane.rightAnchor给定固定部分的大小。

样品:

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

<?import javafx.scene.chart.*?> 
<?import javafx.scene.text.*?> 
<?import javafx.geometry.*?> 
<?import java.lang.*?> 
<?import java.util.*?> 
<?import javafx.scene.*?> 
<?import javafx.scene.control.*?> 
<?import javafx.scene.layout.*?> 

<AnchorPane id="AnchorPane" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sanad.Entry_Page"> 
    <children> 
     <Accordion prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0"> 
     <panes> 
      <TitledPane animated="false" text="untitled 1"> 
      <content> 
       <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
      </content> 
      </TitledPane> 
      <TitledPane animated="false" text="untitled 2"> 
      <content> 
       <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
      </content> 
      </TitledPane> 
      <TitledPane animated="false" text="untitled 3"> 
      <content> 
       <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
      </content> 
      </TitledPane> 
     </panes> 
     </Accordion> 
     <SplitPane dividerPositions="0.5" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="200.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
     <items> 
      <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0"> 
       <children> 
        <LineChart AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
        <xAxis> 
         <CategoryAxis side="BOTTOM" /> 
        </xAxis> 
        <yAxis> 
         <NumberAxis side="LEFT" /> 
        </yAxis> 
        </LineChart> 
       </children> 
      </AnchorPane> 
      <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0"> 
       <children> 
        <TableView prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
        <columns> 
         <TableColumn prefWidth="75.0" text="C1" /> 
         <TableColumn prefWidth="75.0" text="C2" /> 
        </columns> 
        </TableView> 
       </children> 
      </AnchorPane> 
     </items> 
     </SplitPane> 
    </children> 
</AnchorPane> 
0

我尝试做一些与此FXML,但我认为这是坏的创建。你应该重建一切。对于正确的站点,最好使用GridPane而不是AnchorPane,并将所有元素放入网格中。 我在这个hobx中创建了HBox我把两个AnchorPane,然后每个AnchorPane我把你的SplitPane。在这之后,你必须以这样的AnchorPane的左右边各SplitPane连接:

<SplitPane AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> 

下面是这个FXML: 使用SceneBuilder预览它是如何工作的。

<?xml version="1.0" encoding="UTF-8"?> 
<?import javafx.scene.text.*?> 
<?import javafx.geometry.*?> 
<?import java.lang.*?> 
<?import java.util.*?> 
<?import javafx.scene.*?> 
<?import javafx.scene.control.*?> 
<?import javafx.scene.layout.*?> 

<HBox id="AnchorPane" prefHeight="786.0" prefWidth="1024.0" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1"> 
    <AnchorPane prefHeight="200.0" prefWidth="200.0" HBox.hgrow="ALWAYS"> 
     <children> 
       <SplitPane dividerPositions="0.4845360824742268" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="741.0" prefWidth="487.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> 
        <items> 
         <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0" /> 
         <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="100.0" /> 
        </items> 
       </SplitPane> 
     </children> 
    </AnchorPane> 
    <AnchorPane prefHeight="200.0" prefWidth="200.0" HBox.hgrow="ALWAYS"> 
     <children> 
       <SplitPane dividerPositions="0.5720620842572062" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="741.0" prefWidth="508.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> 
        <items> 
         <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" nodeOrientation="LEFT_TO_RIGHT"> 
          <children> 
           <TextField fx:id="formnumer_field" layoutX="8.0" layoutY="14.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="43.0" /> 
           <TextField fx:id="sectornumber_field" layoutX="8.0" layoutY="48.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="43.0" /> 
           <TextField fx:id="fathername_field" layoutX="8.0" layoutY="82.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="43.0" /> 
           <ComboBox fx:id="fatherborn_year" layoutX="8.0" layoutY="116.0" prefHeight="25.0" prefWidth="70.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="226.0" /> 
           <ComboBox fx:id="fatherborn_month" layoutX="85.0" layoutY="116.0" prefHeight="25.0" prefWidth="70.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="226.0" /> 
           <ComboBox fx:id="fatherborn_day" layoutX="162.0" layoutY="116.0" prefHeight="25.0" prefWidth="80.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="226.0" /> 
           <TextField fx:id="fathercurrentjob" layoutX="8.0" layoutY="145.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <TextField fx:id="fatherprevjob" layoutX="8.0" layoutY="179.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <TextField fx:id="mothername_field" layoutX="8.0" layoutY="215.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <TextField fx:id="mother_curr_job" layoutX="8.0" layoutY="278.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <ComboBox fx:id="motherborn_day" layoutX="162.0" layoutY="249.0" prefHeight="25.0" prefWidth="80.0" AnchorPane.rightAnchor="73.0" /> 
           <ComboBox fx:id="motherborn_year" layoutX="8.0" layoutY="249.0" prefHeight="25.0" prefWidth="70.0" /> 
           <TextField fx:id="mother_prev_job" layoutX="8.0" layoutY="312.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <ComboBox fx:id="motherborn_month" layoutX="85.0" layoutY="249.0" nodeOrientation="LEFT_TO_RIGHT" /> 
           <TextField fx:id="homepartner_num" layoutX="8.0" layoutY="346.0" prefHeight="30.0" prefWidth="235.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <ComboBox fx:id="homepartner_year" layoutX="11.0" layoutY="382.0" /> 
           <ComboBox fx:id="homepartner_month" layoutX="88.0" layoutY="382.0" /> 
           <ComboBox fx:id="homepartner_day" layoutX="163.0" layoutY="382.0" /> 
           <ComboBox fx:id="homepartner_name" layoutX="8.0" layoutY="416.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="72.0" /> 
           <CheckBox fx:id="homepartner_gender1" layoutX="141.0" layoutY="456.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="100.0" text="ذكر"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </CheckBox> 
           <CheckBox fx:id="homepartner_gender2" layoutX="8.0" layoutY="456.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="100.0" text="أنثى"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </CheckBox> 
           <Label fx:id="current_cityaa" alignment="CENTER" layoutX="141.0" layoutY="490.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="المحافظة" AnchorPane.rightAnchor="74.0"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
           <TextField fx:id="current_city" layoutX="8.0" layoutY="490.0" AnchorPane.leftAnchor="8.0" /> 
           <Label fx:id="current_cityaa1" alignment="CENTER" layoutX="141.0" layoutY="530.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="الحي" AnchorPane.rightAnchor="74.0"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
           <TextField fx:id="current_suberb" layoutX="8.0" layoutY="530.0" AnchorPane.leftAnchor="8.0" /> 
           <TextField fx:id="prev_suberb" layoutX="11.0" layoutY="615.0" AnchorPane.leftAnchor="11.0" /> 
           <Label fx:id="current_cityaa11" alignment="CENTER" layoutX="144.0" layoutY="615.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="الحي" AnchorPane.rightAnchor="71.0"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
           <Label fx:id="current_cityaa2" alignment="CENTER" layoutX="144.0" layoutY="575.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="100.0" text="المحافظة" AnchorPane.rightAnchor="71.0"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
           <TextField fx:id="prev_city" layoutX="11.0" layoutY="575.0" AnchorPane.leftAnchor="11.0" /> 
          </children> 
         </AnchorPane> 
         <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0"> 
          <children> 
           <Label fx:id="formnumber" contentDisplay="RIGHT" layoutX="8.0" layoutY="14.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="رقم الاستمارة" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
           <Label fx:id="sectornumber" contentDisplay="RIGHT" layoutX="8.0" layoutY="48.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="رقم القطاع" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="fathername" contentDisplay="RIGHT" layoutX="8.0" layoutY="82.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="اسم الأب" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="fatherborn" contentDisplay="RIGHT" layoutX="20.0" layoutY="112.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="المواليد" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="currentjob" contentDisplay="RIGHT" layoutX="20.0" layoutY="142.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل الحالي" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="previousjob" contentDisplay="RIGHT" layoutX="20.0" layoutY="172.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل السابق" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="fatherborn1" contentDisplay="RIGHT" layoutX="20.0" layoutY="244.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="المواليد" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="currentjob1" contentDisplay="RIGHT" layoutX="20.0" layoutY="278.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل الحالي" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="fathername1" contentDisplay="RIGHT" layoutX="8.0" layoutY="208.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="اسم الأم" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="previousjob1" contentDisplay="RIGHT" layoutX="20.0" layoutY="307.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="العمل السابق" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="homepartner_sex" contentDisplay="RIGHT" layoutX="20.0" layoutY="451.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="الجنس" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="homepartner_name" contentDisplay="RIGHT" layoutX="20.0" layoutY="414.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="الاسم" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="partner_born" contentDisplay="RIGHT" layoutX="20.0" layoutY="378.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="127.0" text="الميلاد" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label fx:id="home_partner" contentDisplay="RIGHT" layoutX="8.0" layoutY="341.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="174.0" text="عدد المستضافين" textAlignment="RIGHT" textOverrun="CENTER_ELLIPSIS"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
            <padding> 
             <Insets left="50.0" /> 
            </padding> 
           </Label> 
           <Label alignment="CENTER" layoutX="8.0" layoutY="485.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="175.0" text="السكن الحالي"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
           <Label alignment="CENTER" layoutX="8.0" layoutY="570.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="30.0" prefWidth="175.0" text="السكن الحالي"> 
            <font> 
             <Font size="14.0" /> 
            </font> 
           </Label> 
          </children> 
         </AnchorPane> 
        </items> 
       </SplitPane> 
       <Pane blendMode="RED" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="-Infinity" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> 
        <padding> 
         <Insets top="10.0" /> 
        </padding> 
       </Pane> 
     </children> 
    </AnchorPane> 
</HBox> 
+0

非常感谢你帮助我很多 – gems