title: I want to make a text field editable only when a check box is selected in Netbeans
body: <p>I am using Netbeans, and I want it so a text field is only editable when the user clicks the check box. I have it so when they select the check box it makes the text field editable, but how do I make it so when they de-select the check box the text field becomes un-editable again?</p>
  
  <p>The code I used to make it editable is - </p>
  
  <pre><code>private void chk4By6MouseClicked(java.awt.event.MouseEvent evt) {
      txt4By6.setEditable(true);
  }
  </code></pre>