title: action performed when an option from a JComboBox is chosen
body: <p>Hi I have a <code>JComboBox</code> with 3 options, and I'm trying to figure out which <code>actionlistener</code> to apply in order for something to happen when an option is selected.  At the moment my code is:</p>
  
  <pre><code>comboBoxMode = new JComboBox();
      comboBoxMode.addMouseListener(new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent arg0) {
              int selection = comboBoxMode.getSelectedIndex();
              switch (selection){
              case 0:  break;
              case 1:  enableNormalModeFeatures(); break;
              case 2:  enableRevisionModeFeatures(); break;
              case 3:  enableTimerModeFeatures(); break;
              }
          }
      });
      comboBoxMode.setModel(new DefaultComboBoxModel(new String[] {"[--Please Select a Mode--]", "Normal", "Revision", "Timer"}));
  </code></pre>
  
  <p>The purpose is to enable other selection tools on the page when they choose a particular mode.  mouselistener does not seem to be working.  What confused me is that you actually have to click twice to select an option, but I'm assuming that there is some inbuilt code to only run if a list item has been selected?  Anyway, any pointers would be appreciated, thanks guys!</p>