Layout Managers Flashcards

(33 cards)

0
Q

BorderLayout is default for…

A

Content pane of JFrame, JDialog and JApplet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

BorderLayout

A

Seperates window into different sections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

BorderLayout areas

A

North, South, East, West, Center

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

North

A

PAGE-START

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

South

A

PAGE_END

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

East

A

LINE_END

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

West

A

LINE_START

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Center

A

CENTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

BoxLayout

A

Puts components in single row or column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

BoxLayout Formatting Options

A

Respects components max sizes

Lets you align components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

CardLayout

A

Lets you implement an area that contains different components at different times

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

CardLayout Controlled By

A

Controlled by combo box w/ state of combo box determining which panel (group of components) to display

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

CardLayout Alternative

A

Using a tabbed pane provides similar functionality but with a pre-defined GUI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

FlowLayout

A

Lays out components in a single row

Starts new row if container is not wide enough

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

FlowLayout Default

A

Default for javax.swing.JPanel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

GridBagLayout

A

Flexible and complex
Places components in grid of rows/columns and allows for specified components to span multiple rows or columns
Used components preferred size to determine cell size

16
Q

GridBagConstrains

A

Constraints for each components is the way the program specifies the size and position characteristics of its components

17
Q

GridBagConstrains Code

A

GridBagConstraints.add

Pass it GridBagConstraints object

18
Q

GridBagConstrains

Gridx

A

Specifies cell containing leading edge of display area

First cell in row has gridx=0

19
Q

GridBagConstrains

Gridy

A

Specifies cell at top of components display area

Topmost cell has gridy=0

20
Q

GridBagConstrains

Gridwidth

A

Specifies number of cells in a row for the components display area

21
Q

GridBagConstrains

Gridheight

A

Specifies number of cells in a column for the components display area

22
Q

GridBagConstrains

Weightx

A

Specifies how to distribute extra horizontal space

23
Q

GridBagConstrains

Weighty

A

Specifies how to distribute extra vertical weight

24
GridBagConstrains Instance Variables anchor
Field is used when component is smaller than display area
25
GridBagConstrains Instance Variables fill
Field is used when components display area is larger than the components requested size
26
GridBagConstrains Instance Variables insets
Specifies external padding of component
27
GridBagConstrains Instance Variables ipadx
Specifies internal padding of component as to width
28
GridBagConstrains Instance Variables ipady
Specifies internal padding as to height
29
GridLayout
Arranges components into rows and columns | Components equal in size
30
GroupLayout
Works with horizontal and vertical layouts separately; layout is defined for each dimension independently Each components needs to be defined twice in the layout
31
SpringLayout
Specifies precise relationships between edges of components under its control Lays out children of associated container according to constraints
32
Layout managers used by GUI builders
SpringLayout | GroupLayout