Swing提供两种分层面板:JlayeredPane和JDesktopPane。 JDesktopPane是JLayeredPane的子类,专门为容纳内部框架(JInternalFrame)而设置。 向一个分层面板种添加组件,需要说明将其加入哪一层,指明组件在该层中的位置:add(Component c, Integer Layer, int position)。