title: My subpane is not being added into my main compiler JavaFX
body: <p>my terminology is probably super wrong but I'm trying to create a class that inherits from the Pane class to organize my code a bit. When I try to use this subPane, nothing appears at the spot where my class should add the stuff.</p>
  <p>Here is the code:
  (Main class)</p>
  <pre><code>package ui;
  
  //I have all the imports but there is too much code apperantly...
  
  public class ElectronicStoreView extends Application {
      public void start(Stage primaryStage){
          Pane mainPain = new Pane();
          Button reset = new Button(&quot;Reset Store&quot;);
          Button add_cart = new Button(&quot;Add to Cart&quot;);
          Button remove_cart = new Button(&quot;Remove from \nCart&quot;);
          Button complete = new Button(&quot;Complete Sale&quot;);
          ListView&lt;Product&gt; popular = new ListView&lt;Product&gt;();
          ListView&lt;Product&gt; stock = new ListView&lt;Product&gt;();
          ListView&lt;Product&gt; cart = new ListView&lt;Product&gt;();
          Label t_popular = new Label(&quot;Most popular items:&quot;);
          Label t_stock = new Label(&quot;Store stock&quot;);
          Label t_cart = new Label(&quot;Cart&quot;);
          SumPane summary = new SumPane();
          ObservableList&lt;Product&gt; products = FXCollections.observableArrayList(ElectronicStoreCreator.createStore().products);
  
          summary.relocate(8, 25);
          
          //there's some code here but stackoverflow is getting angry at me
  
          ...
  
          mainPain.getChildren().addAll(reset, remove_cart, complete, add_cart, popular, stock, cart, t_cart, t_popular, t_stock, summary);
  
          Scene scene = new Scene(mainPain, 800, 400);
          primaryStage.setTitle(ElectronicStoreCreator.createStore().getName());
          primaryStage.setResizable(false);
          primaryStage.setScene(scene);
          primaryStage.show();
      }
      public static void main(String[] args) {
          launch(args);
      }
  }
  </code></pre>
  <p>(custom Pane class)</p>
  <pre><code>package ui;
  
  import javafx.scene.control.Label;
  import javafx.scene.control.TextField;
  import javafx.scene.layout.Pane;
  
  public class SumPane extends Pane {
      public SumPane(){
          Pane mainPane = new Pane();
          Label summary = new Label(&quot;Store Summary&quot;);
          Label l_sales = new Label(&quot;Sales:&quot;);
          Label l_revenue = new Label(&quot;Revenue:&quot;);
          Label l_persale = new Label(&quot;$/Sale:&quot;);
          TextField sales = new TextField();
          TextField revenue = new TextField();
          TextField persale = new TextField();
  
          ... //stackoverflow is still angry at me
  
          mainPane.getChildren().addAll(summary, l_sales, l_revenue, l_persale, sales, revenue, persale);
      }
  }
  </code></pre>
  <p>Thanks.</p>