title: JButton not enabling when Combo Box contain data in Java
body: <p><a href="https://i.stack.imgur.com/A0w16.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A0w16.png" alt="enter image description here"></a></p>
  
  <p>As above screenshot,</p>
  
  <p><strong>1.When Item No Combo box is empty "Change Item No" button must be disabled.
  When Name Combo box is empty "Change Drug Name" button must be disabled.</strong></p>
  
  <p><strong>2.When Item No Combo box is not empty "Change Item No" button must be enabled. 
  When Name Combo box is not empty "Change Drug Name" button must be enabled.</strong> </p>
  
  <p>For to do this, I created a method for disabling the buttons at the start;and called it for working;</p>
  
  <pre><code>//method setting the change ID and change drugname buttons disable at the start
  private void disableBtns(){
      chg_itemIDbtn.setEnabled(false);
      chg_drugNamebtn.setEnabled(false);
  }
  </code></pre>
  
  <p>In the "Change Item No" button action performed I coded this to enable button when combo box contain data;</p>
  
  <pre><code>private void chg_itemIDActionPerformed(java.awt.event.ActionEvent evt) {                                           
     if(IDcombo.getItemCount()!=0){
         chg_itemIDbtn.setEnabled(true);
     }
  } 
  </code></pre>
  
  <p>But Button is not enabling;What is the error here?</p>