BorderLayout Class Assignment Help

Assignment Help: >> Layout Managers - BorderLayout Class

BorderLayout Class:

An AWT BorderLayout class places controls so which they fill their Container object. A control is placed according to a geographic position which you specify. A Control could be placed on the south, north, east, and west edges of the Container. You could also place a control in the center of the Container. A centered control is then expanded to fill the remaining space.  Figure displays the border applet along with five controls.  A border applet creates a simple BorderLayout:

import java.awt.*;

public class border extends java.applet.Applet {

public void init() {

setLayout( new BorderLayout() ) ;

add( "North", new Button( "NORTH" ) ) ;

 add( "South", new Button( "SOUTH" ) ) ;

add( "East",  new Button( "EAST"  ) ) ;

add( "West",  new Button( "WEST"  ) ) ;

add( "Center", new Button( "CENTER" ) ) ;

}

}

1403_borderlayout class.png

Whenever you create a BorderLayout, you could specify vertical and horizontal gap values as you could within the setLayout() method (defined in the flow applet).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd