title: How to get the input in ComboBox?
body: <p>I try to get the combo box value but it cant retrieve the input..I m new using NetBeans software..so its complicated for me..Beside, I need you all to help me solve this matter..Hope someone can help me..</p>
  
  <pre><code>public class Lab4 extends javax.swing.JPanel {
  
  
      public Lab4() {
          initComponents();
  
      }
  
  
      }                                        
  
      private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
   {
          int num1,num2,sum;
          num1=Integer.parseInt((String) jComboBox1.getSelectedItem());
          num2=Integer.parseInt((String) jComboBox2.getSelectedItem());
          sum=num1+num2;
          jTextField1.setText(" "+sum);
      }        
      }                                        
  
      private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    {
          int num1,num2,mul;
          num1=Integer.parseInt((String) jComboBox1.getSelectedItem());
          num2=Integer.parseInt((String) jComboBox2.getSelectedItem());
          mul=num1*num2;
          jTextField1.setText(" "+mul);
    }  
      }                                        
  
      private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         
   {
          int num1,num2;
          float div;
          num1=Integer.parseInt((String) jComboBox1.getSelectedItem());
          num2=Integer.parseInt((String) jComboBox2.getSelectedItem());
          div=(float)num1/num2;
          jTextField1.setText(" "+div);
      }      
      }                                        
  
      private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {                                         
   {
          System.exit(0);
      }        
      }                                        
  
  
      // Variables declaration - do not modify                     
      private javax.swing.JButton jButton1;
      private javax.swing.JButton jButton2;
      private javax.swing.JButton jButton3;
      private javax.swing.JButton jButton4;
      private javax.swing.JButton jButton5;
      private javax.swing.JButton jButton6;
      private javax.swing.JComboBox jComboBox1;
      private javax.swing.JComboBox jComboBox2;
      private javax.swing.JLabel jLabel1;
      private javax.swing.JLabel jLabel2;
      private javax.swing.JLabel jLabel3;
      private javax.swing.JTextField jTextField1;
      // End of variables declaration                   
  }
  </code></pre>