Quiz
To see whether your brain cells are laid out properly, test your Java layout management skills by answering the following questions.
Questions
1: |
What container is often used when subdividing an interface into different layout managers?
|
2: |
What is the default layout manager for a panel?
- FlowLayout
- GridLayout
- There is no default
|
3: |
The BorderLayout class gets its name from where?
- The border of each component
- The way components are organized along the borders of a container
- Sheer capriciousness on the part of Java's developers
|
Answers
A1: |
b. JPanel.
|
A2: |
a. Panels use flow layout, but the default manager for frames, windows, and an applet window is grid layout.
|
A3: |
b. The border position of components must be specified as they are added to a container with the use of directional variables such as BorderLayout.WEST and BorderLayout.EAST.
|
|