src/java.desktop/share/classes/javax/swing/BoxLayout.java
changeset 58325 d32a3b1ca84a
parent 52752 5e7dba63836d
equal deleted inserted replaced
58324:0aba35254e00 58325:d32a3b1ca84a
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    34 /**
    34 /**
    35  * A layout manager that allows multiple components to be laid out either
    35  * A layout manager that allows multiple components to be laid out either
    36  * vertically or horizontally. The components will not wrap so, for
    36  * vertically or horizontally. The components will not wrap so, for
    37  * example, a vertical arrangement of components will stay vertically
    37  * example, a vertical arrangement of components will stay vertically
    38  * arranged when the frame is resized.
    38  * arranged when the frame is resized.
    39  * <table class="borderless" style="float:right">
    39  * <div style="float:right;text-align:center">
    40  * <caption>Example:</caption>
    40  *   <p><b>Example:</b>
    41  *    <TR>
    41  *   <p><img src="doc-files/BoxLayout-1.gif"
    42  *      <TD style="text-align:center">
    42  *      alt="The following text describes this graphic."
    43  *         <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
    43  *      width="191" height="201">
    44  *          alt="The following text describes this graphic."
    44  * </div>
    45  *          WIDTH="191" HEIGHT="201" STYLE="FLOAT:BOTTOM; BORDER:0">
       
    46  *      </TD>
       
    47  *    </TR>
       
    48  * </TABLE>
       
    49  * <p>
    45  * <p>
    50  * Nesting multiple panels with different combinations of horizontal and
    46  * Nesting multiple panels with different combinations of horizontal and
    51  * vertical gives an effect similar to GridBagLayout, without the
    47  * vertical gives an effect similar to GridBagLayout, without the
    52  * complexity. The diagram shows two panels arranged horizontally, each
    48  * complexity. The diagram shows two panels arranged horizontally, each
    53  * of which contains 3 components arranged vertically.
    49  * of which contains 3 components arranged vertically.