title: JavaFX- how to save the selected from ChoiceBox
body: <p>How can I save/get the selected from the ChoiceBox</p>
  
  <p>This is how I made the ChoiceBox:</p>
  
  <pre><code>GridPane grid = new GridPane();
  .
  .
  List boxList = new LinkedList&lt;String&gt;();
  boxList.add("Yes");
  boxList.add("No");
  ChoiceBox choBoxAddLR = new ChoiceBox(FXCollections.observableList(boxList));
  grid.add(choBoxAddLR, 1, 1);
  </code></pre>