title: How to get and pass a value from a class to another?
body: <p>I'm trying to create a <code>TextField</code> to get a users name. I've created a new class for containing UI components.  </p>
  
  <pre><code>import javafx.application.Application; 
  import javafx.scene.Scene; 
  import javafx.scene.control.Label;
  import javafx.scene.control.TextField;
  import javafx.scene.layout.HBox;
  import javafx.stage.Stage;
  
  public class start extends Application {
  
      @Override
      public void start(Stage primaryStage) throws Exception {
          Label label = new Label("Name:");
          TextField textField = new TextField();
          HBox hBox = new HBox();
          hBox.getChildren().addAll(label,textField);
          hBox.setSpacing(10);
          Scene scene = new Scene(hBox,300,200);
          primaryStage.setScene(scene);
          primaryStage.setTitle("Hello");
          primaryStage.show();
      }
  }
  </code></pre>
  
  <p>I want to get the name entered in the "Hello" window to use it in another class <code>ShowOff</code>.</p>
  
  <p>ShowOff Class</p>
  
  <pre><code>import javafx.application.Application;
  
  public class ShowOff {
      ShowOff() {
          Application.launch(start.class,"myClass");
      }
  
      public static void main(String[] args)
      {
  
      }
  }
  </code></pre>
  
  <p>How could I implement that?</p>