Java Reference
In-Depth Information
S ELF C HECK
8. Suppose you want to allow users to pick a color from a color dialog box.
Which class would you use? Look in the API documentation.
9. Why does a slider emit change events and not action events?
CHAPTER SUMMARY
1. User-interface components are arranged by placing them inside containers.
Containers can be placed inside larger containers.
2. Each container has a layout manager that directs the arrangement of its
components.
3. Three useful layout managers are the border layout, flow layout, and grid
layout.
4. When adding a component to a container with the border layout, specify the
NORTH , EAST , SOUTH , WEST , or CENTER position.
5. The content pane of a frame has a border layout by default. A panel has a flow
layout by default.
6. For a small set of mutually exclusive choices, use a group of radio buttons or a
combo box.
7. Add radio buttons into a ButtonGroup so that only one button in the group is
on at any time.
8. You can place a border around a panel to group its contents visually.
9. For a binary choice, use a check box.
10. For a large set of choices, use a combo box.
11. Radio buttons, check boxes, and combo boxes generate action events, just as
buttons do.
814
Search WWH ::




Custom Search