ptg7068951
Workshop 199
Workshop
To s e e w h e t h e r y o u r b r a i n c e l l s a r e l a i d o u t p r o p e r l y ,test your Java layout
management skills by answering the following questions.
Quiz
- What container is often used when subdividing an interface into differ-
ent layout managers?
A. JWindow
B. JPanel
C. Container - What is the default layout manager for a panel?
A. FlowLayout
B. GridLayout
B. No default - TheBorderLayoutclass gets its name from where?
A. The border of each component
B. The way components are organized along the borders of a
container
C. Sheer capriciousness on the part of Java’s developers
Answers
- B.JPanel, which is the simplest of the containers.
- A.Panels use flow layout,but the default manager for frames and win-
dows is grid layout. - B.Yo u m u s t s p e c i f y t h e b o r d e r p o s i t i o n o f c o m p o n e n t s w i t h t h e u s e o f
directional variables such as BorderLayout.WESTand
BorderLayout.EASTas you add them to a container.