What is the difference between a root pane and a top-level container in Swing?

I understand that each top-level container has several layers:

root panel
layer panel
content area
glass panel

but I don’t understand if the root panel is a top-level container.

What is the connection between the panel and the container? In fact, when I return the panel with getContentPane(), the object is of type Container!

+5
source share
2 answers

If you look at the previous answers or links, you will see between the lines that the actual answer to the question:

, HAS.

Swing ( JFrame, JDialog JApplet) RootPaneContainer, , ( , JFrame JDialog....)

, , , java.awt.Container ( , javax.swing.JPanel).

udnerstand - , Swing (root, content, glass, layered), , .

+2

JFrame. .

Rootpanecontainer JRootPane:

"" (, -) angular. JFC/Swing (JFrame, JDialog, JWindow JApplet) AWT, . Swing.

+3

All Articles