title: Button is not showing in border layout in Java
body: <p>I want to show a button on a frame in the <code>north</code> direction using border layout but the button is not shown on the frame.  There are no compiler errors.</p>
  <p>My code</p>
  <pre><code>import java.awt.*;
  import javax.swing.*;
  class gui1
      {
          public static void main(String[] args)
          {
              JFrame frm = new JFrame();
  
              Button btn = new Button(&quot;SUBMIT&quot;);
  
              frm.add(btn,BorderLayout.NORTH);
              frm.setSize(800,500);
              frm.setLayout(new BorderLayout());
              frm.setVisible(true);
              frm.setDefaultCloseOperation(frm.EXIT_ON_CLOSE);
         }
      }
  </code></pre>