import java.applet.Applet;
import java.awt.*;
import javax.swing.*;

public class Fig7_11 extends Applet {

    /**
     * Initializes the applet.  You never need to call this directly; it is
     * called automatically by the system once the applet is created.
     */
    public void init() {
	setLayout(new BorderLayout());
	resize(350, 100);
	Panel top = new Panel();
	top.setLayout(new GridLayout(1, 3));
	Panel bottom = new Panel();
	bottom.setLayout(new GridLayout(1, 3));
	add(top, BorderLayout.NORTH);
	for (int i=1; i<=3; i++)
	{
	
	    top.add(new JButton("Button " + i));
	    bottom.add(new JButton("Button " + i));
	}
	add(bottom, BorderLayout.SOUTH);
    }

    /**
     * Called to start the applet.  You never need to call this directly; it
     * is called when the applet's document is visited.
     */
    public void start() {
    }

    /**
     * Called to stop the applet.  This is called when the applet's document is
     * no longer on the screen.  It is guaranteed to be called before destroy()
     * is called.  You never need to call this method directly
     */
    public void stop() {
    }

    /**
     * Cleans up whatever resources are being held.  If the applet is active
     * it is stopped.
     */
    public void destroy() {
    }
}

