# BorderTest.java Five buttons arranged by BorderLayout BorderLayout divides the window into five regions: NORTH, SOUTH, EAST, WEST, and CENTER. /./././././././././././././ import java.applet.Applet; import java.awt.*; /** An example of BorderLayout. * &&&&&&&&&&&&&&&&&&&&&&&&&&& public class BorderTest extends Applet { public void init() { setLayout(new BorderLayout()); add(new Button("Button 1"), BorderLayout.NORTH); add(new Button("Button 2"), BorderLayout.SOUTH); add(new Button("Button 3"), BorderLayout.EAST); add(new Button("Button 4"), BorderLayout.WEST); add(new Button("Button 5"), BorderLayout.CENTER); } } &&&&&&&&&&&&&&&&&&&&
BorderLayout divides the window into five regions
Permanent link to this article: http://bangla.sitestree.com/borderlayout-divides-the-window-into-five-regions/