private void doLaunchButton() {
      launchButton.setEnabled(false);
      if (frame == null) {
         frame = new Pentominos("Pentominos",8,8,true);
         frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
         frame.addWindowListener( new WindowAdapter() {
            public void windowClosed(WindowEvent evt) {
               launchButton.setText("Launch Pentominos");
               launchButton.setEnabled(true);
               frame = null;
            }
            public void windowOpened(WindowEvent evt) {
               launchButton.setText("Close Pentominos");
               launchButton.setEnabled(true);
            }
         });
         frame.setVisible(true);
      }
      else {
         frame.dispose();
      }
   }