O'Reilly logo

Borland® JBuilder™ Developer’s Guide by Jeff Swisher, Saleem Siddiqui, Michael Landy

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

Using the GridBagLayout Manager

Finally, we saved the most important and the most complicated layout manager for last. GridBagLayout divides the frame into rows and columns as it did with GridLayout. Both GridLayout and GridBagLayout share the same definition of a cell—the intersection of a row and a column. Each component, however, is not restricted to be just the size of one cell, but can span multiple cells (see Figure 12.7). The area in which a component can span multiple cells is called its display area. This difference makes GridBagLayout the most flexible and the most portable of all the layout managers. Even though GridBagLayout is complex, it behaves best if you use a smaller number of nested panels.

Figure 12.7. Using GridBagLayout ...

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