title: extjs sample code is not working
body: <pre><code>Ext.create('Ext.panel.Panel', {
  renderTo: Ext.getBody(),
  width: 400,
  height: 300,
  title: 'Container Panel',
  items: [
      {
          xtype: 'panel',
          title: 'Child Panel 1',
          height: 100,
          width: '75%'
      },
      {
          xtype: 'panel',
          title: 'Child Panel 2',
          height: 100,
          width: '75%'
      }
  ]
  });
  </code></pre>
  
  <p>The above code is not being executed... Can you please find the error or bug. I am very new to extjs. I found the above code while going through the <a href="http://docs.sencha.com/ext-js/4-0/#!/guide/layouts_and_containers" rel="nofollow">documentaion</a>(check 'containers' Section). It is executing fine in <a href="http://jsfiddle.net/68rZT/" rel="nofollow">jsfiddle</a> but not in my project.(other samples are working fine in my project).</p>
  
  <p>ANSWER:</p>
  
  <pre><code>Ext.onReady(function(){
      Ext.create('Ext.panel.Panel', {
          renderTo: Ext.getBody(),
          width: 400,
          height: 300,
          layout: 'hbox',
          title: 'Container Panel',
          items: [
             {
                 xtype: 'panel',
                 title: 'Child Panel 1',
                 height: 100,                
                 flex:1
             },
             {
                 xtype: 'panel',
                 title: 'Child Panel 2',
                 height: 100,
                 flex:1
             }
         ]
     });
  });
  </code></pre>