title: Usage of ArrayLists for JSwing components
body: <p>With my code beeing very long doing basically the same for every component just using a different index I decided to place them all in an ArrayList of the needed type.<br>
  My code should en-/disable JSpinners according to CheckBoxes beeing checked.</p>
  
  <p>I made up a code like this:</p>
  
  <pre><code>private static void updateGUI(int index){
  
      boolean enabl = checkBoxes.get(index).isEnabled();
      System.out.println(enabl);
      spinners.get(index).setEnabled(enabl);  
  //more irrelevant stuff done here
  }
  </code></pre>
  
  <p>So I would just give the index of the used checkbox and it should update the JSpinner accordingly. I placed a line to output the current value of the checkbox, when it triggers the function but it always puts out <code>true</code>.</p>
  
  <p>All the checkBoxes are placed in the ArrayList correctly and I cannot find the mistake. Any help is appreciated!</p>