title: Adding or Replacing a new Panel to inside a Window in Ext JS
body: <hr>
  
  <p><strong>Problem has been solved already,
  Thanks anyways :)</strong></p>
  
  <hr>
  
  <p>I've got a Ext.Window object.
  something like:</p>
  
  <pre><code>var mypanel= new Ext.Panel({title:'Placeholder'});
  var cwin = new Ext.Window({
      layout:'fit',
      width:screen.width-200,
      x:200,
      y:150,
      draggable: false,
      closable: false,
      resizable: false,
      plain: true,
      border: false,
      items: [mypanel]
  });
  </code></pre>
  
  <p>I'm trying to replace 'mypanel' with another Ext.Panel object when the user triggers a specific event.
  So i figured I could remove mypanel and than add a new panel to it.
  I got the removing working.
  The adding however is a different story,
  I've tried stuff in the direction of:</p>
  
  <pre><code>mypanel= new Ext.Panel({title:'my new Panel'});
  cwin.add(mypanel); //dit nothing
  cwin.items.add(mypanel); //dit nothing
  cwin.insert(0,mypanel); //dit nothing
  cwin.items.insert(0,mypanel); //dit nothing
  </code></pre>
  
  <p>I'll be happy with any answer for either replacing the existing panel or adding a new panel.</p>
  
  <p>Thank you.</p>