title: Getting int value from combo box in Java
body: <p>I was struggling to get int values from a column in a database into a combo box, so that once selected the values would print out in a textbox when I deviced this solution:</p>
  
  <pre><code>private void jComboBoxSNActionPerformed(java.awt.event.ActionEvent evt) {                                            
  
      JComboBox jComboBoxSN = (JComboBox) evt.getSource();
      int s_n = (Integer) jComboBoxSN.getSelectedItem();
      System.out.println("Number: " + s_n);
  }
  </code></pre>
  
  <p>I want to know, this acceptable programming or bad programming?</p>