Three three simple layout managers flowlayout

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ut(LayoutManager) setLayout(LayoutManager) method in a container. Three Three simple Layout Managers FlowLayout FlowLayout GridLayout GridLayout BorderLayout BorderLayout EE3206/EE5805 Java Programming & Applications 12 FlowLayout FlowLayout Example java.awt.FlowLayout -alignment: int -hgap: int -vgap: int +FlowLayout() +FlowLayout(alignment: int) +FlowLayout(alignment: int, hgap: int, vgap: int) The get and set methods for these data fields are provided in the class, but omitted in the UML diagram for brevity. The alignment of this layout manager (default: CENTER). The horizontal gap of this layout manager (default: 5 pixels). The vertical gap of this layout manager (default: 5 pixels). Creates a default FlowLayout manager. Creates a FlowLayout manager with a specified alignment. Creates a FlowLayout manager with a specified alignment, horizontal gap, and vertical gap. Write a program that adds three labels and text fields into the content pane of a frame with a FlowLayout manager. ShowFlowLayout EE3206/EE5805 Java Programming & Applications Run 13 GridLayout GridLayout Example java.awt.GridLayout -rows: int -columns: int -hgap: int -vgap: int +GridLayout() The get and set methods for these data fields are provided in the class, but omitted in the UML diagram for brevity. The number of rows in this layout manager (default: 1). The number of columns in this layout manager (default: 1). The horizontal gap of this layout manager (default: 0). The vertical gap of this layout manager (default: 0). Creates a default GridLayout manager. +GridLayout(rows: int, columns: in...
View Full Document

Ask a homework question - tutors are online