javafxinclude抛出异常

javafxinclude抛出异常,javafx,fxml,Javafx,Fxml,我使用以下命令编辑主FXML数据:fx:id=spieler\u tree fx:id=karten\u tree fx:id=voelker\u tree 但是如果不编辑这个,它会抛出相同的异常。所以我在fxml中犯了任何错误。我用scene Builder创建了它,我对FXML没有太多经验 这里面有什么大错误吗 例外情况 FXML FXML 公共类树视图控制器{ 专用主控器主控器; @FXML私有树查看spieler_树; @FXML private TreeView karten_树;

我使用以下命令编辑主FXML数据:fx:id=spieler\u tree fx:id=karten\u tree fx:id=voelker\u tree

但是如果不编辑这个,它会抛出相同的异常。所以我在fxml中犯了任何错误。我用scene Builder创建了它,我对FXML没有太多经验

这里面有什么大错误吗

例外情况

FXML

FXML

公共类树视图控制器{ 专用主控器主控器; @FXML私有树查看spieler_树; @FXML private TreeView karten_树; @FXML私有树查看voelker_树; 私有静态CheckBoxTreeItem spieler_Root_aktiv、spieler_Root_Inaktiv、spieler_main Root; 专用静态CheckBoxTreeItem karten_Root_Landkarte、karten_Root_Wasserkart、karten_Root_Funkarten、karten_MainRoot; 私有静态CheckBoxTreeItem voelker_Root_NonPaladin,voelker_Root_Paladin,voelker_MainRoot; 公共树视图控制器{ //树丛中的斯皮尔勒根 Spiler_MainRoot=新的CheckboxTreeItemSpiler; spieler_Root_aktiv=新的CheckBoxTreeItemSpieleraktiv; spieler_Root_Inaktiv=新的CheckBoxTreeItemSpielerinaktiv; //树丛中的根für die Karten karten_MainRoot=新的CheckBoxTreeItemKarten; karten_Root_Landkarte=新的CheckBoxTreeItemLandkarten; karten_Root_wasserkart=新的checkboxtreeitemwasserkart; karten_Root_Funkarten=新的CheckBoxTreeItemFun地图; //树丛中的根für die Karten voelker_MainRoot=新的CheckBoxTreeItemVölker; voelker_Root_Paladin=新的CheckBoxTreeItemPaladin; voelker_Root_NonPaladin=新的CheckBoxTreeItemNonPaladin; //我的根在哪里 spieler_MainRoot.setExpandedtrue; 斯皮尔勒·根·阿克提夫·塞特鲁; karten_MainRoot.setExpandedtrue; voelker_MainRoot.setExpandedtrue; //他妈的,我的朋友们都很生气 karten_Root_Landkarte.setSelectedtrue; karten_Root_wasserkart.setSelectedtrue; 伏尔克·根·圣骑士。选择正确; voelker_Root_NonPaladin.setSelectedtrue; spieler_MainRoot.getChildren.addAllspieler_Root_aktiv,spieler_Root_Inaktiv; karten_MainRoot.getChildren.addAllkarten_Root_Landkarte,karten_Root_wasserkart,karten_Root_Funkarten; 获取children.addAllvoelker\u Root\u圣骑士,voelker\u Root\u非圣骑士; //TreeCell sind für die复选框im Treeview spieler_tree.setCellFactoryCheckBoxTreeCell.forTreeView; karten_tree.setCellFactoryCheckBoxTreeCell.forTreeView; voelker_tree.setCellFactoryCheckBoxTreeCell.forTreeView; 菲尔普斯; 填充图; 填充; 斯皮勒树;根斯皮勒主根; karten_tree.setRootkarten_MainRoot; voelker_tree.setRootvoelker_MainRoot; }
}由于控制器中正在抛出NullPointerException,您能否发布TreeView_控制器的代码,并确定哪一行是第62行?第62行。spieler_tree.setCellFactoryCheckBoxTreeCell.forTreeView;底部的完整代码您还应该显示CheckBoxTreeCell类,甚至forTreeView方法。很抱歉,CheckBoxTreeCell没有自己的类。它的甲骨文类
javafx.fxml.LoadException: 
/C:/Users/Hades-User/Desktop/Projekte/MatchMaker%203.0/bin/matchMakerView/MatchMaker_TreeView2.fxml:7
/C:/Users/Hades-User/Desktop/Projekte/MatchMaker%203.0/bin/matchMakerView/MatchMaker_MainView.fxml:20

    at javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.access$2600(Unknown Source)
    at javafx.fxml.FXMLLoader$IncludeElement.constructValue(Unknown Source)
    at javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
    at javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
    at javafx.fxml.FXMLLoader.load(Unknown Source)
    at matchMakerMain.MatchMaker_Main.start(MatchMaker_Main.java:26)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(Unknown Source)
    at com.sun.javafx.application.LauncherImpl$$Lambda$51/1036649994.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$45/1051754451.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$47/1866685451.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$46/1775282465.run(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
    at com.sun.glass.ui.win.WinApplication$$Lambda$37/1109371569.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at matchMakerController.TreeView_Controller.<init>(TreeView_Controller.java:62)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at sun.reflect.misc.ReflectUtil.newInstance(Unknown Source)
    at javafx.fxml.FXMLLoader$ValueElement.processAttribute(Unknown Source)
    at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(Unknown Source)
    at javafx.fxml.FXMLLoader$Element.processStartElement(Unknown Source)
    at javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
    at javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
    ... 29 more
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.paint.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="matchMakerController.Main_Controller">
   <children>
      <SplitPane dividerPositions="0.19548872180451127" layoutX="152.0" layoutY="59.0" prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
        <items>
            <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="538.0" prefWidth="202.0">
               <children>
                  <Accordion layoutY="14.0" prefHeight="500.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                     <panes>
                        <TitledPane animated="false" text="Spieler">
                           <content>
                              <fx:include fx:id="spieler_tree" source="MatchMaker_TreeView2.fxml" />
                           </content>
                        </TitledPane>
                        <TitledPane animated="false" text="Karten">
                           <content>
                              <fx:include fx:id="karten_tree" source="MatchMaker_TreeView3.fxml" />
                           </content>
                        </TitledPane>
                        <TitledPane animated="false" layoutX="10.0" layoutY="10.0" text="Völker">
                           <content>
                              <fx:include fx:id="voelker_tree" source="MatchMaker_TreeView4.fxml" />
                           </content>
                        </TitledPane>
                        <TitledPane animated="false" prefHeight="223.0" prefWidth="0.0" text="Einstellungen" />
                     </panes>
                  </Accordion>
               </children>
            </AnchorPane>
          <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
               <children>
                  <TabPane layoutX="20.0" prefHeight="598.0" prefWidth="687.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                    <tabs>
                      <Tab text="Match " />
                      <Tab text="Elo     ">
                        <content>
                          <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
                        </content>
                      </Tab>
                    </tabs>
                  </TabPane>
               </children>
            </AnchorPane>
        </items>
      </SplitPane>
   </children>
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>

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

<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="matchMakerController.TreeView_Controller">
   <children>
      <TreeView fx:id="spieler_tree" layoutX="2.0" prefHeight="497.0" prefWidth="203.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
   </children>
</AnchorPane>