< prev index next >

src/java.desktop/share/classes/javax/swing/BoxLayout.java

Print this page




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package javax.swing;
  28 
  29 import java.awt.*;
  30 import java.beans.ConstructorProperties;
  31 import java.io.Serializable;
  32 import java.io.PrintStream;
  33 
  34 /**
  35  * A layout manager that allows multiple components to be laid out either
  36  * vertically or horizontally. The components will not wrap so, for
  37  * example, a vertical arrangement of components will stay vertically
  38  * arranged when the frame is resized.
  39  * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">

  40  *    <TR>
  41  *      <TD style="text-align:center">
  42  *         <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
  43  *          alt="The following text describes this graphic."
  44  *          WIDTH="191" HEIGHT="201" STYLE="FLOAT:BOTTOM; BORDER:0">
  45  *      </TD>
  46  *    </TR>
  47  * </TABLE>
  48  * <p>
  49  * Nesting multiple panels with different combinations of horizontal and
  50  * vertical gives an effect similar to GridBagLayout, without the
  51  * complexity. The diagram shows two panels arranged horizontally, each
  52  * of which contains 3 components arranged vertically.
  53  *
  54  * <p> The BoxLayout manager is constructed with an axis parameter that
  55  * specifies the type of layout that will be done. There are four choices:
  56  *
  57  * <blockquote><b>{@code X_AXIS}</b> - Components are laid out horizontally
  58  * from left to right.</blockquote>
  59  *




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package javax.swing;
  28 
  29 import java.awt.*;
  30 import java.beans.ConstructorProperties;
  31 import java.io.Serializable;
  32 import java.io.PrintStream;
  33 
  34 /**
  35  * A layout manager that allows multiple components to be laid out either
  36  * vertically or horizontally. The components will not wrap so, for
  37  * example, a vertical arrangement of components will stay vertically
  38  * arranged when the frame is resized.
  39  * <table class="borderless" style="float:right">
  40  * <caption style="display:none">Example</caption>
  41  *    <TR>
  42  *      <TD style="text-align:center">
  43  *         <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
  44  *          alt="The following text describes this graphic."
  45  *          WIDTH="191" HEIGHT="201" STYLE="FLOAT:BOTTOM; BORDER:0">
  46  *      </TD>
  47  *    </TR>
  48  * </TABLE>
  49  * <p>
  50  * Nesting multiple panels with different combinations of horizontal and
  51  * vertical gives an effect similar to GridBagLayout, without the
  52  * complexity. The diagram shows two panels arranged horizontally, each
  53  * of which contains 3 components arranged vertically.
  54  *
  55  * <p> The BoxLayout manager is constructed with an axis parameter that
  56  * specifies the type of layout that will be done. There are four choices:
  57  *
  58  * <blockquote><b>{@code X_AXIS}</b> - Components are laid out horizontally
  59  * from left to right.</blockquote>
  60  *


< prev index next >