When using top-level containers in AWT or Swing, the root panel is the base panel.
The hierarchy is as follows:
- Glass panel: usually hidden, the adjustment to the visible surface will be displayed on the lid above the panel areas.
- Layered panel: contains a menu bar and a content panel
- Content Panel It is the basic layout panel on which the components are actually located.
A call to the getRootPane() method will return a link to the base panel, while a call to the getContentPane() method will provide you with a link to the content panel. This is visible by default.
By setting Jbutton by default, what exactly are you trying to accomplish?
venomrld
source share