source file name: BorderDemo.java

 import java.awt.*;
import java.awt.event.*;
class BorderDemo extends Frame
{
String str="National Pledge"+
"\n India is my country and all Indians are my brothers and sisters."+
"\n I love my country and I am proud of its rich and varied heritage."+
"\n I shall always strive to be worthy of it."+
"\n I shall give respect to my parents, teachers and all elders and treat everyone with courtesy."+
"\n To my country and my people, I pledge my devotion."+
"\n In their well-being and prosperity alone lies my happiness.";

public static void main (String ob[])
{
BorderDemo f=new BorderDemo();
f.setTitle("BorderLayout Program");
f.setSize(300,400);
f.setVisible(true);
}
public BorderDemo()
{
BorderLayout bl=new BorderLayout(20,20);
setLayout(bl);
Button b1=new Button("East");
Button b2=new Button("West");
Button b3=new Button("South");
Button b4=new Button("North");
TextArea ta=new TextArea(str);
add(b1,BorderLayout.EAST);
add(b2,BorderLayout.WEST);
add(b3,BorderLayout.SOUTH);
add(b4,BorderLayout.NORTH);
add(ta,BorderLayout.CENTER);
}
}

output: