
JRootPane (Java Platform SE 8 ) - Oracle
Although the menuBar component is optional, the layeredPane, contentPane, and glassPane always exist. Attempting to set them to null generates an exception. To add components to the JRootPane (other than the optional menu bar), you add the object to the contentPane of the JRootPane, like this: rootPane.getContentPane().add(child);
How to Use Root Panes - Oracle
In general, you don't directly create a JRootPane object. Instead, you get a JRootPane (whether you want it or not!) when you instantiate JInternalFrame or one of the top-level Swing containers, such as JApplet, JDialog, and JFrame. Using Top-Level Containers tells you the basics of using root panes — getting the content pane, setting its layout manager, and …
JRootPane (Java SE 17 & JDK 17) - Oracle
Although the menuBar component is optional, the layeredPane, contentPane, and glassPane always exist. Attempting to set them to null generates an exception. To add components to the JRootPane (other than the optional menu bar), you add the object to the contentPane of the JRootPane, like this: rootPane.getContentPane().add(child);
RootPaneContainer (Java Platform SE 8 ) - Oracle
Return this component's single JRootPane child. A conventional implementation of this interface will have all of the other methods indirect through this one. The rootPane has two children: the glassPane and the layeredPane.
RootPaneContainer (Java SE 11 & JDK 11 ) - Oracle
Return this component's single JRootPane child. A conventional implementation of this interface will have all of the other methods indirect through this one. The rootPane has two children: the glassPane and the layeredPane.
JDialog (Java Platform SE 8 ) - Oracle Help Center
The main class for creating a dialog window. You can use this class to create a custom dialog, or invoke the many class methods in JOptionPane to create a variety of standard dialogs. For information about creating dialogs, see The Java Tutorial section How to Make Dialogs. The JDialog component contains a JRootPane as its only child. The contentPane should be the parent of any children of the ...
JDialog (Java SE 11 & JDK 11 ) - Oracle
Overrides: getRootPane @BeanProperty (bound =false, hidden =true, description ="the RootPane object for this dialog.") public JRootPane getRootPane()
JWindow (Java Platform SE 8 ) - Oracle
Parameters: root - the new rootPane property See Also: getRootPane() public Container getContentPane()
JFrame (Java SE 22 & JDK 22) - Oracle
Removes the specified component from the container. If comp is not the rootPane, this will forward the call to the contentPane. This will do nothing if comp is not a child of the JFrame or contentPane.
JApplet (Java SE 11 & JDK 11 ) - Oracle
Parameters: root - the rootPane object for this applet See Also: getRootPane() getContentPane public Container getContentPane()