Example of BorderLayout

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

public class BorderButtons extends Applet {

  public void init() {
  
    this.setLayout(new BorderLayout(20, 10));

    this.add("North", new Button("North"));
    this.add("South", new Button("South"));
    this.add("Center", new Button("Center"));
    this.add("East", new Button("East"));
    this.add("West", new Button("West"));
    
  }

}

Previous | Next | Top
Last Modified July 3, 1998
Copyright 1997, 1998 Elliotte Rusty Harold
elharo@metalab.unc.edu