当前页面: 开发资料首页 → J2SE 专题 → Frame和Panel有何区别
Frame和Panel有何区别
摘要: Frame和Panel有何区别
RT
A Frame is a top-level window with a title and a border.
Panel is the simplest container class. A panel provides space in which an application can attach any other component, including other panels
请用中文解释,谢谢
楼上还看不懂?晕了...
组件Frame是顶层容器,组件panel本身也是一个容器,也可以向其中添加其他GUI组件,但是panel并不是顶层容器,要在屏幕上显示必须将它添加到顶层容器中.
panel最常用的功能是面板作为容纳其他组件的容器.
在制作复杂的用户界面时,常常需要使用多个panel将复杂的界面分解为相对较简单的子界面,然后在对每个panel进行布局
ok了
谢谢 顶下!
那么还有哪些容器可以称为顶层容器?