title: Counter in for loop java
body: <p>I´m creating a simple text editor and in it, I have popup Window with 8 buttons and they will work as preset of the text size in the editor and I want the first button to be 2 and then next button +2 I have all this in a for loop but the int which handles the 2+ stays the same in the 8 rounds the loop goes. Could maybe some of you look at my code and see what I did wrong?</p>
  
  <pre><code>public static void texSizePreset() {
      for(int i=0; i &lt; stylePresetButtons.length; i++) {
          int defaultFontSizePreset = 2;
          textSizePreset[i] = defaultFontSizePreset;
          String convertedFontSizeText;
          convertedFontSizeText = Integer.toString(textSizePreset[i]);
          stylePresetButtons[i].setText(convertedFontSizeText);
          defaultFontSizePreset += 2;
          System.out.println(defaultFontSizePreset);
      }
  }
  </code></pre>