import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
...

/**
 * Debugging harness for a Frame
 *
 * @param args command line arguments are ignored.
 */
public static void main ( String args [] )
   {
   final SomeFrame frame = new SomeFrame( titleString + " " + versionString );
   frame.setSize( width, height );
   frame.addWindowListener
   (
   new WindowAdapter()
      {
      /**
       * Handle request to shutdown.
       *
       * @param e event giving details of closing.
       */
      public void windowClosing( WindowEvent e)
         {
         System.exit(0);
         } // end WindowClosing
      } // end anonymous class
   ); // end addWindowListener line
   frame.validate();
   frame.setVisible( true );

   } // end main