title: swing and GUI components not appearing
body: <p>I'm a complete noobie with swing. I'm trying to set a few JPanels and TextAreas to show up but after spending 2 days reading the APIs and trying to add panels to frames and textareas to panels and nothing is showing up.. I'm utterly confused. If anyone could explain how is the best way to do this I would be very grateful</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  import javax.swing.*;
  
  public class GUI {
  
  public static void main(String[] args) {
  
  
      JFrame frame = new JFrame();
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
      frame.setLayout(new FlowLayout());                           // J FRAME
  
      JPanel panel = new JPanel();                                               // first panel on the left
      panel.setLayout(new BoxLayout(panel, 1));
  //  frame.getContentPane().setBackground(Color.red);
      frame.add(panel);
  
      JLabel surname = new JLabel();
      JLabel initial = new JLabel();
      JLabel ext    = new JLabel();
      surname.setOpaque(true);
      initial.setOpaque(true);
      ext.setOpaque(true);
      frame.add(surname);
      panel.add(initial);
      panel.add(ext);
  
  
      JTextArea table = new JTextArea();
      table.setEditable(false);
      panel.add(table);
      table.setVisible(true);
  </code></pre>