The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition)
| < Day Day Up > |
Chapter 4. Laying Out Components within a Container
http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html This chapter tells you how to use layout managers, which are objects that control the size and position of components in a container. It also tells you how to use absolute positioning (no layout manager) and presents an example of how to write a custom layout manager. How-to information for each of the commonly used layout managers is in Chapter 8, Layout Manager Reference (page 457). The chapter contains the following sections:
Solving Common Layout Problems (page 738) in the Appendix tells you how to fix common layout glitches. A Visual Guide to Layout Managers BorderLayout BoxLayout CardLayout FlowLayout GridBagLayout GridLayout SpringLayout Using Layout Managers Setting the Layout Manager Adding Components to a Container Providing Size and Alignment Hints Putting Space between Components Setting the Container's Orientation Choosing a Layout Manager How Layout Management Works Creating a Custom Layout Manager Doing without a Layout Manager (Absolute Positioning) Summary Questions and Exercises Example Programs |
| < Day Day Up > |