/[classpath]/classpath/javax/swing/JRootPane.java
ViewVC logotype

Diff of /classpath/javax/swing/JRootPane.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by langel, Fri Sep 9 14:44:39 2005 UTC revision 1.26 by abalkiss, Thu Sep 15 17:24:01 2005 UTC
# Line 42  import java.awt.BorderLayout; Line 42  import java.awt.BorderLayout;
42  import java.awt.Component;  import java.awt.Component;
43  import java.awt.Container;  import java.awt.Container;
44  import java.awt.Dimension;  import java.awt.Dimension;
45    import java.awt.IllegalComponentStateException;
46  import java.awt.LayoutManager;  import java.awt.LayoutManager;
47  import java.awt.LayoutManager2;  import java.awt.LayoutManager2;
48  import java.io.Serializable;  import java.io.Serializable;
# Line 404  public class JRootPane extends JComponen Line 405  public class JRootPane extends JComponen
405    }    }
406    
407    /**    /**
408     * DOCUMENT ME!     * Sets the JRootPane's content pane.  The content pane should typically be
409       * opaque for painting to work properly.  This method also
410       * removes the old content pane from the layered pane.
411     *     *
412     * @param p DOCUMENT ME!     * @param p the Container that will be the content pane
413       * @throws IllegalComponentStateException if p is null
414     */     */
415    public void setContentPane(Container p)    public void setContentPane(Container p)
416    {    {
417      contentPane = p;      if (p == null)
418      getLayeredPane().add(contentPane, JLayeredPane.FRAME_CONTENT_LAYER);        throw new IllegalComponentStateException ("cannot " +
419                "have a null content pane");
420        else
421          {
422            if (contentPane != null && contentPane.getParent() == layeredPane)
423              layeredPane.remove(contentPane);
424            contentPane = p;
425            getLayeredPane().add(contentPane, JLayeredPane.FRAME_CONTENT_LAYER);
426          }
427    }    }
428    
429    /**    /**

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26