title: How to set Combobox value to one of the choices in the list
body: <p>I need to change the value of the current JComboBox value.</p>
  
  <p>I got this in my Settings gui class used by Main.class:</p>
  
  <pre><code>package com.tominocz.cookieclicker;
  
  import java.awt.BorderLayout;
  import java.awt.Color;
  import java.awt.Dimension;
  import java.awt.FlowLayout;
  import java.awt.Toolkit;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  import javax.swing.ImageIcon;
  import javax.swing.JButton;
  import javax.swing.JComboBox;
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.border.LineBorder;
  
  @SuppressWarnings({ "serial", "rawtypes", "unchecked" })
  public class Settings extends JFrame {
  
      private String[] choiceList = { "Default (Arial)", "Comic Sans MS" };
  
      public class ChoiceComboListener implements ActionListener {
          public void actionPerformed(ActionEvent ev) {
              JComboBox cb = (JComboBox) ev.getSource();
              String currentComboSelection = (String) cb.getSelectedItem();
              if (currentComboSelection.equals(choiceList[0])) {
                  Main.SelectedFont = "Arial";
                  Main.refreshGame();
                  Main.opt.setSize(240, 105);
                  Save.saveGame(Main.save);
              }
              if (currentComboSelection.equals(choiceList[1])) {
                  Main.SelectedFont = "Comic Sans MS";
                  Main.refreshGame();
                  Main.opt.setSize(240, 107);
                  Save.saveGame(Main.save);
              }
          }
      }
  
      public Settings() {
          super("Settings");
          setLayout(new FlowLayout());
  
          Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
          int x = (int) (((screen.getWidth()) - this.getWidth()) / 2 - 200);
          int y = (int) (((screen.getHeight()) - this.getHeight()) / 2 - 100);
          this.setLocation(x, y);
          this.setAlwaysOnTop(true);
  
          this.setIconImage(((ImageIcon) Main.SettingsIcon).getImage());
  
          JPanel northPanel = new JPanel();
          northPanel.setIgnoreRepaint(true);
          northPanel.setBorder(new LineBorder(Color.GRAY));
          this.getContentPane().add(northPanel, BorderLayout.NORTH);
          JComboBox choiceCombo = new JComboBox(choiceList);
          northPanel.add(Main.ChooseFont);
          northPanel.add(choiceCombo);
          choiceCombo.addActionListener(new ChoiceComboListener());
  
          // LOOK HEREEEEEEEEEEEEEEEEEEEEEEE
          if (Main.SelectedFont.equals("Comic Sans MS")) {
              [the current JComboBox value(may be the default one - choiceList[0])] = choiceList[1];
          }
          // LOOK HEREEEEEEEEEEEEEEEEEEEEEEE
  
          Main.OK.setBorder(null);
          Main.OK.setBorderPainted(false);
          Main.OK.setContentAreaFilled(false);
          add(Main.OK);
          Main.OK.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                  Object source = e.getSource();
                  if (source instanceof JButton) {
                      Main.opt.dispose();
                  }
              }
          });
      }
  }
  </code></pre>
  
  <p>Now how do I change the currentComboSelection value if i'm not available to use it in:</p>
  
  <p>public Settings() {</p>
  
  <p>...</p>
  
  <p>?</p>