title: How do I read the chosen element of each combo box within my JavaFX GUI?
body: <p>I am attempting to read all the elements of the combo boxes present within my GUI. I am currently attempting this by adding all the combo boxes to an arraylist after they've been added to the GUI. From here I tried using a for each loop but IntelliJ kept on giving me an error that it needed an object.</p>
  
  <p>In the current for loop, shown below, I'm trying to do the same simply by referencing the arraylist objects by index, but it refuses to recognize them as combobox objects, so "getValue()" is returning a "Cannot Resolve Method" error, which makes no sense.</p>
  
  <p>I am very frustrated and any help would be greatly appreciated.</p>
  
  <pre><code>for(int i = 0; i &lt; cb.size(); i++){
                      f.WriteFile("answers.txt",true, cb.get(i).getValue().toString());
                  }
  </code></pre>