O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Layouts

Recall that several of the sample applets shown in Chapter 36 use layout managers such as CardLayout or GridLayout to manage the placement of components on the screen. You can see the effect of a layout manager by resizing the HelloPlus window. Figure 37.6 shows a maximized window in which the components have room to spread out; in Figure 37.7, the window is tall and narrow—the components appear one above the other.

Figure 37.6. When the components have enough room, they're laid out one beside the other.

Figure 37.7. When the window is narrow, the components flow one above the next.

You don't have to worry about the precise ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required