Class 1, Part 2 |
Intro to Java 30-IT-396 |
|
Flow Layout
-
The FlowLayout is fairly common and simple.
-
It arranges components side by side at their prefered size.
-
When one row runs out of room, it simply starts a new row.
-
Let's start a FlowLayout and add three buttons. Note that they are
all given their preferred size, and centered on the panel. We can
tell it to align them to the left or right, though.
-
Next, let's add more buttons and see what happens when we run out of room.
-
It simply continues to the next rows, still giving the buttons their preferred
sizes. We could change the size of any of the buttons, and the buttons
would stay at that size.
Created by: Brandan
Jones January 4, 2002