Ext.onReady(function(){
    var win;
		var button = Ext.get('show-btn2');
    showBtn = Ext.get('show-btn2');
     Ext.get('show-btn2').on('click', function(){  
        if(!win){
            win = new Ext.Window({
                applyTo     : 'hello-win',
                layout      : 'fit',
                width       : 540,
                height      : 480,
                x: 220,
                y: 120,
                closeAction :'hide',
                plain       : true,
                items       : new Ext.TabPanel({
                    applyTo        : 'hello-tabs',
                    autoTabs       : true,
                    activeTab      : 0,
                    deferredRender : false,
                    border         : false
                }),

                buttons: [{
                    text     : 'Close',
                    handler  : function(){
                        win.hide();
                    }
                }]
            });
        }
        win.show(button);
    });
});