title: JPanel code in a class without main method
body: <p>I am trying code a JPanel in a class (classA) and trying to instantiate it from a class (classB) (where the main method is).</p>
  
  <p>But when I try to code the classA the content assist does not supports. It does not resolves panel related codes, shows syntax error.</p>
  
  <p>What could the problem be?</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  
  public class gui1 {
      JFrame j = new JFrame("MY Menu");
      j.setSize(900, 700);
      j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      j.setResizable(false);
  }
  </code></pre>