title: How to import JFrame?
body: <pre><code>package main;
  
  import javax.swing.JFrame;
  
  public class Main extends JPanel{
  
      public Main() {
          add(new Panel());
          setName("NGame");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
      }
  }
  </code></pre>
  
  <p>The <code>import javax.swing.JFrame;</code> line isn't recognized as a class by eclipse and will not import. The two set methods are not recognised as the JFrame will not import. I have the latest JDK and have checked that the JFrame class is existant with the <kbd>shift</kbd> + <kbd>ctrl</kbd> + <kbd>T</kbd> command. What is happening?</p>