August 2004
Intermediate to advanced
480 pages
9h 41m
English
Now we look at different ways to organize controls on your panels.
This is the simplest to use, and is used in many Swing examples in this book. In part, that's because you don't have to do much to make it go, and it is used by default by Jpanels. It arranges components in a flow—that is, by adding them in a certain direction. The effect is similar to typing into a word processor: as you add new words, they just get tacked onto the end. FlowLayout has three constructors.
FlowLayout()
Nuff said.
There are two component orientations possible for a Flow Layout: left to right and right to left. They are
ComponentOrientation.LEFT_TO_RIGHT ComponentOrientation.RIGHT_TO_LEFT
You specify which you want to ...
Read now
Unlock full access