import javax.swing.JRootPane; //导入方法依赖的package包/类
public void layoutContainer(Container parent)
{
JRootPane rp = (JRootPane) parent;
JLayeredPane layeredPane = rp.getLayeredPane();
Component contentPane = rp.getContentPane();
Component menuBar = rp.getJMenuBar();
Component glassPane = rp.getGlassPane();
if (glassPaneBounds == null || layeredPaneBounds == null
|| contentPaneBounds == null || menuBarBounds == null)
{
Insets i = rp.getInsets();
int containerWidth = parent.getBounds().width - i.left - i.right;
int containerHeight = parent.getBounds().height - i.top - i.bottom;
// 1. The glassPane fills entire viewable region (bounds - insets).
// 2. The layeredPane filles entire viewable region.
// 3. The titlePane is placed at the upp