Chapter 5
Using Layout Managers
In This Chapter
Flow layout
Border layout
Box layout
Grid layout
GridBag layout
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.
Get Java All-in-One For Dummies, 4th 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.