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

public class SimulateBorderLayout
    extends Applet
{

    public void init() {
	setLayout(new GridBagLayout());
	GridBagConstraints gbc = new GridBagConstraints();
	gbc.gridwidth = 3;
	gbc.fill = GridBagConstraints.HORIZONTAL;
	gbc.gridwidth = GridBagConstraints.REMAINDER;
	gbc.weightx = 1;
	add(new Button("North"), gbc);
	gbc = new GridBagConstraints();
	gbc.fill = GridBagConstraints.VERTICAL;
	gbc.weighty = 1;
	add(new Button("The Long West Label"), gbc);
	gbc = new GridBagConstraints();
	gbc.fill = GridBagConstraints.BOTH;
	gbc.weightx = 1;
	gbc.weighty = 1;
	add(new Button("Center"), gbc);
	gbc = new GridBagConstraints();
	gbc.gridwidth = GridBagConstraints.REMAINDER;
	gbc.fill = GridBagConstraints.VERTICAL;
	gbc.weighty = 1;
	add(new Button("East"), gbc);
	gbc = new GridBagConstraints();
	gbc.gridwidth = 3;
	gbc.fill = GridBagConstraints.HORIZONTAL;
	add(new Button("South"), gbc);
    }

}

