Java Reference
In-Depth Information
color chooser
A control for selecting colors from a palette.
file chooser
A window for interacting with the filesystem—selecting a directory or a
filename.
In addition to all these, there are various kinds of containers—objects
whose job is to hold and display the other objects:
panel
A simple container.
split pane
A container divided into 2 separate parts.
scroll pane
A complex control with scrollbars, used to hold objects larger than the
displayable area.
tabbed pane
A complex control with tab buttons to select different panels.
toolbar
A container for holding objects (usually buttons) which can attach to
different sides of a window, or separate from a window and stand alone.
16.5
L AYOUT M ANAGERS
Once you decided on all the graphical objects that you want to pack into your
GUI, there is still one major hurdle—where to place all the objects. This can
be one of the more challenging parts of GUI design because so many different
screen sizes are available to the end user. How do you make your GUI look
good to all (or most) of them?
Beginners often want to fix their components to absolute locations—for
example, by sketching the GUI out on a piece of graph paper and then using
those coordinates to fix the location. But with a windowing display, the user
can grab a corner of the window and resize it. So, consider that piece of graph
paper—what if it just got stretched to twice the size? Do you want all the con-
trols to just get bigger? Buttons need not grow larger, but it would be nice to
Search WWH ::




Custom Search