RT

解决方案 »

  1.   

    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
      

  2.   

    组件Frame是顶层容器,组件panel本身也是一个容器,也可以向其中添加其他GUI组件,但是panel并不是顶层容器,要在屏幕上显示必须将它添加到顶层容器中.
        panel最常用的功能是面板作为容纳其他组件的容器.
        在制作复杂的用户界面时,常常需要使用多个panel将复杂的界面分解为相对较简单的子界面,然后在对每个panel进行布局