import java.awt.* ;

public class LayoutTests extends Frame {

  private Button b1, b2;
  private Label lab;
  private TextField tf;

  // activate (un-comment) one of the following lines:
  private FlowLayout myLayout = new FlowLayout();
  // private FlowLayout myLayout = new FlowLayout( FlowLayout.LEFT );
  // private GridLayout myLayout = new GridLayout(2,2);
  // private GridLayout myLayout = new GridLayout(4,1);
  // private BorderLayout myLayout = new BorderLayout();

  public void init() {
    setLayout ( myLayout );
    b1 = new Button("ok");
    add(b1,"West");
    b2 = new Button("cancel");
    add(b2,"South");
    lab = new Label("Hallo!");
    add(lab,"Center");
    tf = new TextField("",20);
    add(tf,"East");
    setSize(300,200); // or: pack();
    setVisible(true);
  }

  public static void main (String[] args) {
    LayoutTests f = new LayoutTests();
    f.init();
  }

}


