title: pane.getChildren().addAll(); not working in a scene javafx
body: <p>This code will not allow the line to draw in my window... All I have in the fxml file is a simple pane with the fx:id of hi to test things out. There is no error, the line simply doesn't appear. I've also tried this with a box and circle. I really need help, this is an important project.</p>
  
  <pre><code>import java.net.URL;
  import java.util.ResourceBundle;
  import javafx.fxml.FXML;
  import javafx.fxml.Initializable;
  import javafx.scene.layout.AnchorPane;
  import javafx.scene.layout.BorderPane;
  import javafx.scene.layout.Pane;
  import javafx.scene.shape.Line;
  import javafx.scene.Scene;
  import javafx.scene.paint.Color;
  
  public class PlotSceneController implements Initializable {
  
      @FXML
      Pane hi;
  
      @Override
      public void initialize(URL url, ResourceBundle rb) {
  
      Line line = new Line(0,0,10,110);
          line.setStroke(Color.BLACK);
          line.setStrokeWidth(10);
          hi.getChildren().addAll(line);
  
      }
  
  }
  </code></pre>
  
  <p>FXML File</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;?import javafx.scene.shape.*?&gt;
  &lt;?import java.lang.*?&gt;
  &lt;?import java.net.*?&gt;
  &lt;?import java.util.*?&gt;
  &lt;?import javafx.scene.*?&gt;
  &lt;?import javafx.scene.control.*?&gt;
  &lt;?import javafx.scene.layout.*?&gt;
  
  
  &lt;Pane fx:id="hi" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-
  Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" 
  xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"&gt;
  &lt;children&gt;
  
  &lt;/children&gt;
  &lt;/Pane&gt;
  </code></pre>
  
  <p>Main Class, leads to another page with a button that leads to the page I'm having trouble with. </p>
  
  <pre><code>public class Main extends Application {
  
  Stage firstStage;
  Scene loginButton;
  
  @Override
  public void start(Stage primaryStage) throws Exception {             
  
      Parent root = FXMLLoader.load(getClass().getResource("Main.fxml"));
      firstStage = primaryStage;                  
      loginButton = new Scene(root, 900, 700);    
  
      primaryStage.setTitle("Treatment Data");            
      primaryStage.setScene(loginButton);         
      primaryStage.show();                        
  }
  
  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) {        //Main class
      launch(args);                       //Launches application/window
  }
  </code></pre>
  
  <p>}</p>