title: 'if' statement with modulus operator change method calls on button press
body: <p>basically it's supposed to be a button that toggles whether a JTextfield is editable or not</p>
  
  <p>i'm pretty much 100% sure there's a better way of doing this (this doesn't work)
  i'm guessing a for loop?</p>
  
  <pre><code>while (e.getSource() == button2)
      {
          int count=0;//odd
          if (count % 2 == 0) // if count is even
          {
              textField1.setEditable(false);
              button2.setEnabled(true);
              count++;
          }        
          else//odd
          {
              textField1.setEditable(true);
              count++;
          }
      }
  </code></pre>