title: cant change label and buttons values
body: <p>I'm writing a simple quiz-game application using JavaFx. I want set text on label and buttons with data from a list and table.</p>
  
  <p>I created three class: Main, Controller and Quiz.fxml. I have problem with communication classes and method. 
  In 'Main.java' I created object "Controller controller = new Controller()" and I call method "controller.setText" from 'Controller.java' class. </p>
  
  <p>Now, I have a few options:</p>
  
  <p>-if declate list(ArrayList questions) and tab(String[][] answers) in constuctor 'public Controller(){}' app doesnt work, I get error in this line "  "</p>
  
  <p>-if declare everything in 'Text()' method(list, tab and setting text on label) application run but values buttons and label are not changed</p>
  
  <p>-if I declare list and tab in 'setData()', and next I want to change the buttons and label value from 'Text()' method, I cant see the list and I have to declare the same list 'questions' in 'Text()'</p>
  
  <pre><code>public class Main extends Application {
  
  
  
  @Override
  public void start(Stage primaryStage) throws Exception {
      try {
  
          Parent root = FXMLLoader.load(getClass().getResource("/Controller/Quiz.fxml"));
          Scene scene = new Scene(root,500,400)
          primaryStage.setScene(scene);
          primaryStage.show();
      } catch(Exception e) {
          e.printStackTrace();
      }
  }
  public static void main(String[] args) {
      launch(args);
      Controller controller = new Controller();
      controller.Text();}
  </code></pre>
  
  <p>Controller class:</p>
  
  <pre><code>public class Controller  {
  
  @FXML private Label questionLabel;
  @FXML private RadioButton answer_btn1;
  @FXML private RadioButton answer_btn2;
  @FXML private RadioButton answer_btn3;
  @FXML private RadioButton answer_btn4;
  @FXML private Button nextBtn;
  
  
  
  public void Text() {
      List &lt;String&gt; questions = new ArrayList&lt;String&gt;();
  
      questions.add("pytanie1");
      questions.add("pytanie2");
      questions.add("pytanie3");
      questions.add("pytanie4");
      questions.add("pytanie5");
      questions.add("pytanie6");
      questions.add("pytanie7");
      questions.add("pytanie8");
      questions.add("pytanie9");
      questions.add("pytanie10");
  
      String[][] answers = new String[1][4];
      answers[1][1] = "a) odp";
      answers[1][2] = "b) odp";
      answers[1][3] = "c) odp";
      answers[1][4] = "d) odp";
  
  
      questionLabel.setText("");
  
      questionLabel.setText(questionLabel.getText()+answers[1][1]);
      answer_btn1.setText("aaa");
  }
  </code></pre>
  
  <p>What do I have to do to change name buttons and label?</p>