前面說到主界面的實際建立是在DesignerFrame的構造函數中,再次看看它的構造函數:
public DesignerFrame(ToolBarMenuDock ad) {
this.setName("designer_frame");
this.ad = ad;
this.initTitleIcon();
this.setTitle();
DesignerContext.setDesignerFrame(this);
this.basePane.setLayout(new BorderLayout());
this.basePane.add(CenterRegionContainerPane.getInstance(), "Center");
this.laoyoutWestPane();
this.basePane.add(EastRegionContainerPane.getInstance(), "East");
this.basePane.setBounds(0, 0, this.contentWidth, this.contentHeight);
this.layeredPane.add(this.basePane);
this.modWindowBounds();
this.checkToolbarMenuEnable();
this.addWindowListeners(this.getFrameListeners());
this.addMacOsListener();
this.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent e) {
DesignerF