import java.awt.*;
public class Border2 extends java.applet.Applet {
public void init() {
setLayout( new BorderLayout() );
Panel p = new Panel();
p.add(new Button("East") );
add("East", p);
p = new Panel();
p.add(new Button("West") );
add("West", p);
p = new Panel();
p.add(new Button("North") );
add("North", p);
p = new Panel();
p.add(new Button("South") );
add("South", p);
p = new Panel();
p.add(new Button("Center") );
add("Center", p);
//resize(preferredSize());
}
}
|