gpt4 book ai didi

swing - Swing 中的根 Pane 和顶级容器有什么区别?

转载 作者:行者123 更新时间:2023-12-04 19:21:46 32 4
gpt4 key购买 nike

我知道每个顶级容器都有一些层:

root pane
layer pane
content pane
glass pane



但我不明白根 Pane 是否是顶级容器本身。

Pane 和容器之间是什么关系?事实上,当我返回一个 Pane 时 getContentPane() ,对象的类型是 Container !

最佳答案

您还有一个 JFrame .阅读更多 How to Use Root Panes .

RootPaneContainer
来自 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.

关于swing - Swing 中的根 Pane 和顶级容器有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2850298/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com