Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JavaFX Invaild属性_Java_Javafx_Scenebuilder - Fatal编程技术网

JavaFX Invaild属性

JavaFX Invaild属性,java,javafx,scenebuilder,Java,Javafx,Scenebuilder,我使用场景生成器构建了一个场景,但在尝试使用FXMLLoader打开fxml文件时出现了一些错误。我的JavaFX版本是2.2.55-b13。这是我的fxml: <?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.collections.*?> <?import javafx.geometry.

我使用场景生成器构建了一个场景,但在尝试使用FXMLLoader打开fxml文件时出现了一些错误。我的JavaFX版本是2.2.55-b13。这是我的fxml:

<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.collections.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.text.*?>
<BorderPane xmlns="http://javafx.com/javafx/2.2" xmlns:fx="http://javafx.com/fxml/1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" fx:controller="org.impactvolunteers.management.gui.CreateVolunteerController">
   <center>
      <VBox prefHeight="200.0" prefWidth="100.0">
         <children>
            <Label text="Create new volunteer" />
            <Separator prefWidth="200.0">
               <VBox.margin>
                  <Insets bottom="10.0" top="10.0" />
               </VBox.margin>
            </Separator>
            <GridPane prefHeight="116.0" prefWidth="760.0">
               <columnConstraints>
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                  <ColumnConstraints hgrow="SOMETIMES" maxWidth="10.0" minWidth="10.0" prefWidth="10.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
               </columnConstraints>
               <rowConstraints>
                  <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                  <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                  <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                  <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
               </rowConstraints>
               <children>
                  <Label text="Name:" />
                  <Label text="Birthday:" GridPane.rowIndex="1" />
                  <Label text="Phone:" GridPane.rowIndex="2" />
                  <Label text="Email:" GridPane.rowIndex="3" />
                  <Label text="City:" GridPane.columnIndex="3" GridPane.rowIndex="2" />
                  <Label text="Country:" GridPane.columnIndex="3" GridPane.rowIndex="3" />
                  <TextField fx:id="name" GridPane.columnIndex="1" />
                  <TextField fx:id="birthday" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                  <TextField fx:id="phone" GridPane.columnIndex="1" GridPane.rowIndex="2" />
                  <TextField fx:id="email" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                  <TextField fx:id="city" GridPane.columnIndex="4" GridPane.rowIndex="2" />
                  <Button maxWidth="180.0" minWidth="180.0" mnemonicParsing="false" onAction="#onSaveClicked" prefWidth="180.0" text="Save" GridPane.columnIndex="4" />
                  <Button maxWidth="180.0" minWidth="180.0" mnemonicParsing="false" onAction="#onBackClicked" prefWidth="180.0" text="Back" GridPane.columnIndex="3" />
                  <ChoiceBox fx:id="country" prefWidth="150.0" GridPane.columnIndex="4" GridPane.rowIndex="3" />
               </children>
            </GridPane>
            <GridPane>
               <columnConstraints>
                  <ColumnConstraints hgrow="SOMETIMES" maxWidth="160.0" minWidth="160.0" prefWidth="160.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                  <ColumnConstraints hgrow="SOMETIMES" maxWidth="150.0" minWidth="150.0" prefWidth="150.0" />
               </columnConstraints>
               <rowConstraints>
                  <RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="10.0" minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="10.0" minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
               </rowConstraints>
               <children>
                  <TextArea fx:id="qualifications" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                  <TextArea fx:id="workexperience" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                  <TextArea fx:id="interests" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="5" />
                  <Label text="Degrees/Qualifications:" GridPane.rowIndex="1" />
                  <Label text="Work Experience:" GridPane.rowIndex="3" />
                  <Label text="Interests:" GridPane.rowIndex="5" />
               </children>
            </GridPane>
            <GridPane>
               <columnConstraints>
                  <ColumnConstraints hgrow="SOMETIMES" maxWidth="160.0" minWidth="160.0" prefWidth="160.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
               </columnConstraints>
               <rowConstraints>
                  <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
               </rowConstraints>
               <children>
                  <Label text="Preferred Beneficiaries:" GridPane.rowIndex="1" />
                  <Label text="Regions:" GridPane.rowIndex="2" />
                  <CheckBox mnemonicParsing="false" text="CheckBox" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                  <CheckBox mnemonicParsing="false" text="CheckBox" GridPane.columnIndex="1" GridPane.rowIndex="2" />
               </children>
            </GridPane>
            <GridPane>
               <columnConstraints>
                  <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="100.0" prefWidth="100.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
               </columnConstraints>
               <rowConstraints>
                  <RowConstraints maxHeight="10.0" minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="150.0" minHeight="150.0" prefHeight="150.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="10.0" minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
                  <RowConstraints maxHeight="150.0" minHeight="150.0" prefHeight="150.0" vgrow="SOMETIMES" />
               </rowConstraints>
               <children>
                  <Label text="Availability:" GridPane.rowIndex="1" />
                  <Label text="Skills:" GridPane.rowIndex="3" />
                  <TableView prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
                     <columns>
                        <TableColumn prefWidth="75.0" text="C1" />
                        <TableColumn prefWidth="75.0" text="C2" />
                     </columns>
                  </TableView>
                  <TableView prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
                     <columns>
                        <TableColumn prefWidth="75.0" text="C1" />
                        <TableColumn prefWidth="75.0" text="C2" />
                     </columns>
                  </TableView>
               </children>
            </GridPane>
         </children>
         <opaqueInsets>
            <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
         </opaqueInsets>
         <padding>
            <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
         </padding>
      </VBox>
   </center>
</BorderPane>

以及stacktrace:

Invalid property.
/home/kennelcrash/Semester%204/SEPM%20PR/qse-sepm-ss14-08/VolunteerAdmin/target/classes/fxml/CreateVolunteer.fxml:14
  at javafx.fxml.FXMLLoader$PropertyElement.<init>(FXMLLoader.java:1169)
  at javafx.fxml.FXMLLoader.createElement(FXMLLoader.java:2380)
  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2353)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2172)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
  at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
  at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
  at org.impactvolunteers.management.gui.Screen.init(Screen.java:40)
  at org.impactvolunteers.management.gui.ScreensController.init(ScreensController.java:39)
  at org.impactvolunteers.management.gui.MainController.initialize(MainController.java:26)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
  at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2223)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
  at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
  at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
  at org.impactvolunteers.management.App.start(App.java:32)
  at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
  at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
  at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
  at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
  at java.security.AccessController.doPrivileged(Native Method)
  at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
  at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
  at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
  at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:89)
  at java.lang.Thread.run(Thread.java:745)

java.lang.reflect.InvocationTargetException
/home/kennelcrash/Semester%204/SEPM%20PR/qse-sepm-ss14-08/VolunteerAdmin/target/classes/fxml/MainApplication.fxml
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2228)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
  at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
  at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
  at org.impactvolunteers.management.App.start(App.java:32)
  at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
  at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
  at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
  at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
  at java.security.AccessController.doPrivileged(Native Method)
  at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
  at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
  at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
  at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:89)
  at java.lang.Thread.run(Thread.java:745)

Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javafx.fxml.LoadException: java.lang.reflect.InvocationTargetException
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2228)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
    at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
    at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
    at org.impactvolunteers.management.App.start(App.java:32)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:89)
    ... 1 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2223)
    ... 16 more
Caused by: javafx.fxml.LoadException: Invalid property.
    at javafx.fxml.FXMLLoader$PropertyElement.<init>(FXMLLoader.java:1169)
    at javafx.fxml.FXMLLoader.createElement(FXMLLoader.java:2380)
    at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2353)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2172)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809)
    at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
    at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
    at org.impactvolunteers.management.gui.Screen.init(Screen.java:40)
    at org.impactvolunteers.management.gui.ScreensController.init(ScreensController.java:39)
    at org.impactvolunteers.management.gui.MainController.initialize(MainController.java:26)
    ... 26 more
无效属性。
/home/kennelcrash/Semmer%204/SEPM%20PR/qse-SEPM-ss14-08/志愿者管理员/target/classes/fxml/create志愿者。fxml:14
在javafx.fxml.fxmloader$PropertyElement。(fxmloader.java:1169)
在javafx.fxml.fxmloader.createElement(fxmloader.java:2380)
在javafx.fxml.fxmloader.processStartElement(fxmloader.java:2353)
在javafx.fxml.fxmloader.load(fxmloader.java:2172)
在javafx.fxml.fxmloader.load(fxmloader.java:2069)
在javafx.fxml.fxmloader.load(fxmloader.java:2830)
在javafx.fxml.fxmloader.load(fxmloader.java:2809)
在org.impact.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
在org.impact.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
位于org.impact.management.gui.Screen.init(Screen.java:40)
位于org.impact.management.gui.ScreensController.init(ScreensController.java:39)
位于org.impact.management.gui.MainController.initialize(MainController.java:26)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)中
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)中
位于java.lang.reflect.Method.invoke(Method.java:606)
在sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)中
在sun.reflect.GeneratedMethodAccessor5.invoke处(未知源)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)中
位于java.lang.reflect.Method.invoke(Method.java:606)
位于sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
在javafx.fxml.fxmloader.load(fxmloader.java:2223)
在javafx.fxml.fxmloader.load(fxmloader.java:2069)
在javafx.fxml.fxmloader.load(fxmloader.java:2830)
在javafx.fxml.fxmloader.load(fxmloader.java:2809)
在org.impact.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
在org.impact.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
在org.impact.management.App.start(App.java:32)
位于com.sun.javafx.application.launchempl$5.run(launchempl.java:319)
位于com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
位于com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
位于com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
位于java.security.AccessController.doPrivileged(本机方法)
位于com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
位于com.sun.glass.ui.invokelateDispatcher$Future.run(invokelateDispatcher.java:76)
在com.sun.glass.ui.gtk.GtkApplication.\u runLoop(本机方法)
位于com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:89)
运行(Thread.java:745)
java.lang.reflect.InvocationTargetException
/home/kennelcrash/Semmer%204/SEPM%20PR/qse-SEPM-ss14-08/志愿者管理员/target/classes/fxml/MainApplication.fxml
在javafx.fxml.fxmloader.load(fxmloader.java:2228)
在javafx.fxml.fxmloader.load(fxmloader.java:2069)
在javafx.fxml.fxmloader.load(fxmloader.java:2830)
在javafx.fxml.fxmloader.load(fxmloader.java:2809)
在org.impact.management.FXMLSpringLoader.load(FXMLSpringLoader.java:86)
在org.impact.management.FXMLSpringLoader.load(FXMLSpringLoader.java:71)
在org.impact.management.App.start(App.java:32)
位于com.sun.javafx.application.launchempl$5.run(launchempl.java:319)
位于com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
位于com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
位于com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
位于java.security.AccessController.doPrivileged(本机方法)
在com.sun.javafx.application.Pla上
<opaqueInsets>
            <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</opaqueInsets>