4 Replies Latest reply on Nov 8, 2012 6:14 PM by 971758

    TreeView not showing up.

      okay so short story. I have this treeview, It is part of an fxml file made in scene builder 1.1. I have the java controller for it too. Everything else shows up just fine when it is compiled and run in Netbeans. But the treeview space is there but empty. It shows up correctly with sample data when previewing in Scenebuilder but not when compiled.

      Now I know it should not be empty because I have this code in my controller.

      @FXML // fx:id="properties"
      private TreeView<String> properties; // Value injected by FXMLLoader

      //test code section
      final TreeItem<String> root = new TreeItem<String>("Root Node");
      new TreeItem<String>("Test"),
      new TreeItem<String>("Test2"),
      new TreeItem<String>("Test3")
      TreeView<String> properties = new TreeView<String>(root);
      //end test code section

      and its certainly in the FXML too

      <AnchorPane minHeight="580.0" minWidth="5.0" prefHeight="100.0" prefWidth="160.0">
      <AnchorPane minWidth="800.0" prefHeight="529.0" prefWidth="794.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
      <SplitPane dividerPositions="0.24444444444444444" focusTraversable="true" prefHeight="529.0" prefWidth="794.0" AnchorPane.bottomAnchor="-3.0" AnchorPane.leftAnchor="-1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="3.0">
      <AnchorPane maxWidth="-Infinity" minHeight="600.0" minWidth="0.0" prefHeight="593.0" prefWidth="300.0">
      <TreeView fx:id="properties" cache="true" editable="true" minWidth="198.0" prefHeight="750.0" prefWidth="248.0" AnchorPane.bottomAnchor="1.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="23.0">
      <Glow level="0.03584905660377358" />

      note some things here were previously together on 1 line but could not be pasted in that way since this does not have horizontal scrollbars.

      Edited by: Alexander B. Java on Nov 5, 2012 8:22 PM