Java Reference
In-Depth Information
Figure 11-4 demonstrates several struts in action. Notice that you can have varying strut
distances between different components, and struts at the end of a container may have no
effect. After a user resizes a screen, the strut distance between components remains fixed, as
you can see in Figure 11-4.
Figure 11-4. Using struts in a Box
JSplitPane Class
Similar to the Box container, the JSplitPane container allows you to display components in a
single row or column. Whereas a Box can contain any number of components, a JSplitPane is
meant to display two—and only two—components. The components are of variable size and
separated by a movable divider. The divider is specially constructed in that the end user can grab
it and drag the divider to adjust the size of the contained components. Figure 11-5 demonstrates
both vertical and horizontal split panes, shown before and after moving the divider.
Search WWH ::




Custom Search