你可以这样做Ext.getCmp('masterPane').down('grid').removeAll()//移除grid
Ext.getCmp('masterPane').add(mypanel)//添加mypanel
你已经移除了grid,这个grid就不存在了,它已经被你销毁了,需要重新渲染
祝你好运!
masterPane.removeAll();
masterPane.add(mypanel);
masterPane.doLayout();
去把ExtJs的api下载下来,多看看,对你有很大帮助的