title: Adding button to Frame
body: <p>I have never actually worked with GUI's before when it comes to Java.   I am trying to add a simple button to the JFrame, but it doesn't add.  This is the way that I have been seeing online can someone point out what I'm doing wrong?</p>
  
  <pre><code>import java.awt.*;
  import javax.swing.*;
  import java.awt.event.*;
  import java.io.*;
  import javax.swing.event.*;
  
  public class WavPlayer 
  {       
      public void go()
      {
          JFrame frame = new JFrame("Wav Player");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          //JButton play = new JButton("test");
          play = new JButton("Test");
          frame.setSize(500, 500);
          add(play);          
      }
  
      public static void main(String [] args)
      {
          WavPlayer player = new WavPlayer();
          player.go();
      }
  }
  </code></pre>