title: Java Swing layout not appearing
body: <p>I'm just getting into creating GUIs in Java, and with this basic setup, I can't get anything to appear in my JFrame:</p>
  
  <pre><code>public class Main extends JFrame {
  
  public static void main(String[] args) {
      JFrame jframe = new JFrame();
      jframe.setSize(400,400); // setting size
      jframe.setVisible(true); // Allow it to appear
      jframe.setTitle("Lab 7");
      jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      Main init = new Main(); 
  }  
  
   public Main() {
      Container pane = getContentPane();
      pane.setBackground(Color.BLUE);
      pane.setLayout(new FlowLayout());
      JButton add = new JButton("Add");
      JButton close = new JButton("Close");
      JTextArea area = new JTextArea();
      JScrollPane scroll = new JScrollPane(area);
  
      add.setBounds(70, 125, 80, 20);
      close.setBounds(70, 115, 80, 20);
      pane.add(add);
      pane.add(close);
      pane.add(scroll);
      AddClick added = new AddClick();
      add.addActionListener(added);
  }
  }
  </code></pre>
  
  <p>I also tried moving all the JFrame stuff into public Main() but it caused an infinite amount of windows opening and I had to end the program each time. </p>