title: How to fix Java error "Unresolved compilation problem" in Eclipse IDE?
body: <p>I'm trying to dabble with a basic ComboBox (i hear these are very outdated). The goal is to create a box with options for the user and when they click said option in the ComboBox they will get information from an array of strings based on the case detected by the switch. This is my code:</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  
  public class SolicitorComBox extends JFrame implements ActionListener {
      String[] MuniArray = {"Allepo", "Avalon"};
      JComboBox MuniList = new JComboBox (MuniArray);
  JLabel lblText = new JLabel();
  
  public static void main (String[] args) { 
      SolicitorComBox fr = new SolicitorComBox();
      centerFrame(fr);
      fr.setVisible(true);
  
  
  }
  private static void centerFrame(SolicitorComBox fr) {
      // TODO Auto-generated method stub
  
  }
  public SolicitorComBox() {
      setLayout (new FlowLayout());
      setSize (400, 300);
      setTitle ("Solicitor Search");
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
      MuniList.setSelectedIndex(0);
      MuniList.addActionListener(this);
      add(MuniList);
      add(lblText);
  
  }
  public void actionPerformed(ActionEvent e) {
      if (e.getsource() == MuniList) {
          JComboBox cb = (JComboBox).e.getsource();
          String msg = (String)cb.getSelectedItem();
          switch (msg) {
              case "Allepo": lblText.setText("The attorney is Joe!");
              break;
              case "Avalon": lblText.setText("The attorney is Dana!");
              break;
  </code></pre>
  
  <p>This is the error I'm getting when I try to run the code:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
  at SolicitorComBox.main(SolicitorCombobox.java:10)
  </code></pre>