title: Items in ComboBox
body: <p>I am tying to perform and action when an item in combo box are selected, but it performs an action no matter what item is selected.Can someone help me out please.</p>
  
  <pre><code>//number of players combo box
          players = new JComboBox();
          contentPane.add(players, BorderLayout.SOUTH);
          players.addItem("1 Player");
          players.addItem("2 Players");
          players.addActionListener(new ActionListener() {
  
           @Override
          public void actionPerformed(ActionEvent e) {
           makeFrame();
          }
         });
         players.addItem("3 Players");
  //end of combo box
  </code></pre>