Answer: No.

Try this:

  import javax.swing.*;

  public class a {
     public static void main (String args[]) {
        JPanel p = new JPanel();
        p.setSize(400,400);
        p.setVisible(true);
     }
  }
and this
  import javax.swing.*;
  import java.awt.*;

  class c extends JFrame {
     JFrame f;

     public c () {
        setLayout(new BorderLayout());
        add("Center", f = new JFrame());
        f.setSize(100,100);
        f.setVisible(true);
     }
  }

  public class b {
     public static void main (String args[]) {
        c r = new c();
        r.setSize(200,200);
        r.setVisible(true);
     }
  }
That should make it plain.