I understand that every top level container has some layers:
root pane
layer pane
content pane
glass pane
but I don't understand whether the root pane is the top level container itself.
What is the relationship between a pane and a container? In fact, when I return a pane with
getContentPane()
, the object is of type Container
!
You also have a JFrame
. Read more on How to Use Root Panes.
From JRootPane:
The "heavyweight" components (those that delegate to a peer, or native component on the host system) are shown with a darker, heavier box. The four heavyweight JFC/Swing containers (JFrame, JDialog, JWindow, and JApplet) are shown in relation to the AWT classes they extend. These four components are the only heavyweight containers in the Swing library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With