12.9. Summary

Layout managers help you position components in the window. They are particularly helpful when you resize the window, add components, or move the program among operating systems. There are five traditional layout managers: FlowLayout, BorderLayout, GridLayout, CardLayout, and GridBagLayout. In Java 2, the BoxLayout manager was added for additional flexibility. If you don't like any of those, you can always turn off the layout manager, but clever use of nested containers often makes turn-off unnecessary.

Okay, so you've got windows galore. You're a layout manager pro. But putting something in the windows would be nice. Read on: Chapter 13 covers buttons, check boxes, radio buttons, scrollbars, and other GUI controls.

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.