O'Reilly logo

Java All-in-One For Dummies, 4th Edition by Doug Lowe

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

Chapter 5

Using Layout Managers

In This Chapter

arrow Flow layout

arrow Border layout

arrow Box layout

arrow Grid layout

arrow GridBag layout

arrow Group layout

Controlling the layout of components in a frame is one of the most difficult aspects of working with Swing. In fact, it can be downright exasperating. Sometimes the components almost seem to have minds of their own. They get stubborn and refuse to budge. They line up on top of one another when you want them to be side by side. You make a slight change to a label or text field and the whole frame seems to rearrange itself. At times, you'll want to put your fist through the monitor.

warning.eps I recommend against putting your fist through your monitor. You'll make a mess, cut your hand, and have to spend money on a new monitor — and when you get your computer working again, ...

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