jdk/src/share/classes/javax/swing/JWindow.java
changeset 21255 0afb44cd0215
parent 20458 f2423fb3fd19
child 21278 ef8a3a2a72f2
equal deleted inserted replaced
21254:f6d36ee3f269 21255:0afb44cd0215
    41  * on it.
    41  * on it.
    42  * <p>
    42  * <p>
    43  * The <code>JWindow</code> component contains a <code>JRootPane</code>
    43  * The <code>JWindow</code> component contains a <code>JRootPane</code>
    44  * as its only child.  The <code>contentPane</code> should be the parent
    44  * as its only child.  The <code>contentPane</code> should be the parent
    45  * of any children of the <code>JWindow</code>.
    45  * of any children of the <code>JWindow</code>.
    46  * As a conveniance <code>add</code> and its variants, <code>remove</code> and
    46  * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
    47  * <code>setLayout</code> have been overridden to forward to the
    47  * methods of this class are overridden, so that they delegate calls
    48  * <code>contentPane</code> as necessary. This means you can write:
    48  * to the corresponding methods of the {@code ContentPane}.
       
    49  * For example, you can add a child component to a window as follows:
    49  * <pre>
    50  * <pre>
    50  *       window.add(child);
    51  *       window.add(child);
    51  * </pre>
    52  * </pre>
    52  * And the child will be added to the contentPane.
    53  * And the child will be added to the contentPane.
    53  * The <code>contentPane</code> will always be non-<code>null</code>.
    54  * The <code>contentPane</code> will always be non-<code>null</code>.