title: Error: "Uncompilable source code"
body: <p>I am in the preliminary stages and can't seem to get the program to run regardless of what I try.  I think the issue has something to do with how I am calling the keyword "this" but I can't be sure.  </p>
  
  <p>For now I have the program simply printing out what is highlighted in the JComboBox in order to keep it simple being that the comparison aspect can be done simply later using "if" statements.  Any help is appreciated.  Here is my code:</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  
  public class Main extends JPanel implements ActionListener {
      JFrame frame;
      JPanel panel;
      JLabel label1;
      JLabel label2;
  
      public Main() {
          super(new BorderLayout());
  
          String[] colorStrings = { "", "Black", "White", "Red", "Blue", "Yellow",
          "Green", "Orange", "Purple"};
          JComboBox color1 = new JComboBox(colorStrings);
          color1.setSelectedIndex(7);
          color1.addActionListener(this);
          JComboBox color2 = new JComboBox(colorStrings);
          color2.setSelectedIndex(7);
          color2.addActionListener(this);
  
          add(label1, BorderLayout.PAGE_START);
          add(color1, BorderLayout.PAGE_START);
          add(label2, BorderLayout.PAGE_END);
          add(color2, BorderLayout.PAGE_END);
          setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
      }
  
      public void actionPerformed(ActionEvent e) {
          JComboBox listen1 = (JComboBox)e.getSource();
          String otherColor1 = (String)listen1.getSelectedItem();
          System.out.println(otherColor1);
          JComboBox listen2 = (JComboBox)e.getSource();
          String otherColor2 = (String)listen2.getSelectedItem();
          System.out.println(otherColor2);
      }
      private static void createAndShowGUI(JComboBox color1, JComboBox color2) {
          JFrame frame = new JFrame("Does it match?");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          JComponent newContentPane = new Main();
          newContentPane.add(color1, color2);
          newContentPane.setOpaque(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          frame.pack();
          frame.setVisible(true);
      }
  
  public static void main(String[] args) {
      javax.swing.SwingUtilities.invokeLater(new Runnable() {
          public void run() {
              createAndShowGUI();
          }
      });
  } 
  }
  </code></pre>
  
  <p>The error that shows up is:</p>
  
  <blockquote>
    <p>run:
    Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: createAndShowGUI
        at Main$1.run(Main.java:53)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.awt.EventQueue$3.run(EventQueue.java:686)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
    BUILD SUCCESSFUL (total time: 3 seconds)</p>
  </blockquote>