import java.applet.Applet; import java.awt.*; public class BorderLayout4 extends Applet { Button EastButton, NorthButton, CenterButton; public void init() { // instantiating the button objects EastButton = new Button("East"); NorthButton = new Button("North"); CenterButton = new Button("Center"); /* setting layout to BorderLayout with 50 horizontal and 100 vertical pixels of spacing */ setLayout(new BorderLayout(50,100)); // order is not important here as we are specifying the positions add("East", EastButton); add("North", NorthButton); add("Center", CenterButton); } }