title: JComboBox setting label and value
body: <p>Is it possible to set a value and a label to a <code>JComboBox</code> so I can show a label but get a value that is different?</p>
  
  <p>For example in JavaScript I can do:</p>
  
  <pre><code>document.getElementById("myselect").options[0].value //accesses value attribute of 1st option
  document.getElementById("myselect").options[0].text //accesses text of 1st option
  </code></pre>