title: issue with fram hiding
body: <p>I am having trouble hiding a new frame when I am trying to open a new one.  At the end of this code there is a call to start() method of another class and I would like this classes frame to be hidden but I cannot seem to access the from from its current location.</p>
  
  <pre><code>package InventoryApp;
  
  //Import
  import java.awt.BorderLayout;
  import java.awt.Color;
  import java.awt.Font;
  import java.awt.Graphics;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import javax.swing.JButton;
  import javax.swing.JFrame;
   /**
   *
   * @author Curtis
   */
  public class JSplash extends JFrame implements ActionListener
  {
      //declaration of variable objects
      Font myFont = new Font("Arial", Font.BOLD, 20);
      JButton myButton = new JButton("Click Me!");
      Color bgColor = new Color(0,0,255);
      Color firstColor = new Color(255,255,255);
      String first = "Welcome to DaemoDynamics!";
       String last = "Click the Button";
       String middle = "";
       String middle2 = "";
  
  
      int count = 1;  
      //Constructor
      public JSplash()
              {
                  super("Item Inventory Application");
                  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  setLayout (new BorderLayout());
                  add(myButton, BorderLayout.SOUTH);
                  setDefaultLookAndFeelDecorated(true);
                  getContentPane().setBackground(bgColor);
                  //adds action listener
                  myButton.addActionListener(this);
              }
      //Paint method
      @Override
      public void paint(Graphics e)
      {
          super.paint(e);
          e.setFont(myFont);
          e.setColor(firstColor);
  
  
            e.drawString(first, 14, 80);
            e.drawString(last, 70, 240);
            e.drawString(middle, 75, 150);
            e.drawString(middle2, 60, 175);
      }
  
       public static void begin()
       {
               final int TALL = 316;
               final int WIDE = 304;
               JSplash frame = new JSplash();
               frame.setSize(WIDE, TALL);
               frame.setVisible(true);
       }
      //Listener Method
      @Override
      public void actionPerformed(ActionEvent e) 
      {
          //First Time button hit
          if(count == 1)
          {
              middle = "Brighter Business";
                  middle2 = "for A Brighter Future";
                  last = "Click Again to Begin";
                  repaint();
              //increases button count
              count ++;
          }
          else//if button count is not 1
          {
              frame.setVisible(false);
              FinalProject.start();
          }  
      }
  }
  </code></pre>