Thursday, 7 May 2015

BORDER LAYOUT PROGRAM IN JAVA

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

/**
<applet code=borderlayout.class  width=500  height=500>
</applet>
*/

public class borderlayout extends Applet
{
Button b1,b2,b3.b4;
String result;

public void init()
{
b1=new Button(“one”);
b2=new Button(“two);
b3=new Button(“three”);
b4=new Button(“four”);
setLayout(new BorderLayout(10,10));

add(“North”,b1);
add(“East”,b2);
add(“West”,b3);
add(“South”,b4);
add(“Center”,newTextArea());
}

}


No comments:

Post a Comment