title: How do you change the label text in java using eclipse and scene builder?
body: <p>I'm trying to make a "Hello World" using eclipse and scene builder.</p>
  
  <pre><code>package lj.HelloWorld;
  import java.io.IOException;
  import javafx.application.Application;
  import javafx.event.ActionEvent;
  import javafx.fxml.FXML;
  import javafx.fxml.FXMLLoader;
  import javafx.stage.Stage;
  import javafx.scene.Scene;
  import javafx.scene.control.Label;
  import javafx.scene.layout.BorderPane;
  
  public class HelloWorld extends Application {
      private Stage primaryStage;
      private BorderPane rootLayout;
  
  @Override
  public void start(Stage primaryStage) {
      this.primaryStage = primaryStage;
      this.primaryStage.setTitle("AddressApp");
  
      initRootLayout();
  }
  
  /**
   * Initializes the root layout.
   */
  public void initRootLayout() {
      try {
          // Load root layout from fxml file.
          FXMLLoader loader = new FXMLLoader();
          loader.setLocation(HelloWorld.class.getResource("rootHelloWorld.fxml"));
          rootLayout = (BorderPane) loader.load();
  
          // Show the scene containing the root layout.
          Scene scene = new Scene(rootLayout);
          primaryStage.setScene(scene);
          primaryStage.show();
      } catch (IOException e) {
          e.printStackTrace();
      }
  }
  // my attempt to refer to my label object in scenebuilder.
  @FXML
  private Label lblOutput;
  
  @FXML
  private void handleClick(ActionEvent event) {
      lblOutput.setText("This");
  }
  }
  </code></pre>
  
  <p>And this is my fxml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;?import java.lang.*?&gt;
  &lt;?import javafx.scene.control.*?&gt;
  &lt;?import javafx.scene.layout.*?&gt;
  &lt;?import javafx.scene.layout.BorderPane?&gt;
  
  &lt;BorderPane prefHeight="200.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"&gt;
     &lt;center&gt;
        &lt;Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER"&gt;
           &lt;children&gt;
              &lt;Button fx:id="btnClick" layoutX="98.0" layoutY="14.0" mnemonicParsing="false" text="Click Me" /&gt;
              &lt;Label fx:id="lblOutput" layoutX="167.0" layoutY="18.0" text="1231231" /&gt;
           &lt;/children&gt;
        &lt;/Pane&gt;
     &lt;/center&gt;
  &lt;/BorderPane&gt;
  </code></pre>
  
  <p>I just want to know how to refer the the label and change its text to "Hello World".
  PS: I'm from vb.net learning java. I've tried looking for a Hello World sample on google but some sites are down and others are just too complicated for me. Like the ch.makery tutorial.</p>