18.3k views
4 votes
BorderLayout is the default layout manager for a JFrame’scontent pane

?? True

?? False

1 Answer

1 vote

Answer:

True

Step-by-step explanation:

BorderLayout is the default JFrame, JInternalFrame, and JApplet content panel layout manager.Border layout are used to arrange components(such as text fields, buttons, labels etc) in a particular manner.

Example

public class BorderLayout

extends Object

implements LayoutManager2, Serializable

These classes are used for making effective GUI(graphical user interface) in java.

Example for JFrame's content pane-

JButton button = new JButton("Button click (PAGE_START)");

/*making object JButton with a button name 'click*/

pane.add(button, BorderLayout.PAGE_START);

/*Adding Border layout in button*/

PAGE_START is BorderLayout constant,there are four more which defines the area-

PAGE_END

LINE_START

LINE_END

CENTER

User Tahiem
by
5.3k points