Review this lesson’s material by taking this three-question quiz.
1. Which of the following user interface components is not a container?
2. Which component can be placed into a Scroll pane?
C. Any component
3. If you use setSize() on an application’s main frame, where will it appear on your desktop?
A. In the center of the desktop
B. In the same spot where the last application appeared
C. In the upper-left corner of the desktop
1. B. JTextArea requires a container to support scrolling, but it is not a container itself.
2. C. Any component can be added to a Scroll pane, but most are unlikely to need scrolling.
3. C. This is a trick question. Calling setSize() has nothing to do with a window’s position on the desktop. You must call setBounds() rather than setSize() to choose where a frame will appear.