@SuppressWarnings("deprecation")
	private void build(
	Applet applet, String[] args, int width, int height )
	{
	++instances;
	this.applet = applet;
	this.args = args;
	applet.setStub( this );
	name = applet.getClass().getName();
	setTitle( name );

	// Set up properties.
	Properties props = System.getProperties();
	props.put( "browser", "Acme.MainFrame" );
	props.put( "browser.version", "11jul96" );
	props.put( "browser.vendor", "Acme Laboratories" );
	props.put( "browser.vendor.url", "http://www.acme.com/" );

	// Turn args into parameters by way of the properties list.
	if ( args != null )
	    parseArgs( args, props );

	// If width and height are specified in the parameters, override
	// the compiled-in values.
	String widthStr = getParameter( "width" );
	if ( widthStr != null )
	    width = Integer.parseInt( widthStr );
	String heightStr = getParameter( "height" );
	if ( heightStr != null )
	    height = Integer.parseInt( heightStr );

	// Were width and height specified somewhere?
	if ( width == -1 || height == -1 )
	    {
	    System.err.println( "Width and height must be specified." );
	    return;
	    }

	// Do we want to run bare-bones?
	String bonesStr = getParameter( "barebones" );
	if ( bonesStr != null && bonesStr.equals( "true" ) )
	    barebones = true;

	if ( ! barebones )
	    {
	    // Make menu bar.
	    MenuBar mb = new MenuBar();
	    Menu m = new Menu( "Applet" );
	    m.add( new MenuItem( "Restart" ) );
	    m.add( new MenuItem( "Clone" ) );
	    m.add( new MenuItem( "Close" ) );
	    m.add( new MenuItem( "Quit" ) );
	    mb.add( m );
	    setMenuBar( mb );
	    }

	// Lay out components.
	setLayout( new BorderLayout() );
	add( "Center", applet );
	if ( ! barebones ) {
	    Panel borderPanel =
		new acme.widgets.BorderPanel( acme.widgets.BorderPanel.RAISED );
	    borderPanel.setLayout( new BorderLayout() );
	    label = new Label( "" );
	    borderPanel.add( "Center", label );
	    add( "South", borderPanel );
	    }

	// Set up size.
	pack();
	validate();
	appletSize = applet.size();
	// appletSize = applet.getSize();
	applet.resize( width, height );
	// applet.setSize( width, height );
	show();

	// Start a separate thread to call the applet's init() and start()
	// methods, in case they take a long time.
	(new Thread( this )).start();
	}