Hi folks,

I have a couple of questions. It would be nice, to get an answere..

as you can see, I've created a function to create a Window.

1) In this case, this should be a login window. But how the hell can I tell this button not to be in the middle, but at the right side of the window. something like a position tag or so.

2) Also, I saw some issues about Panels.. Why do I need Panels? I mean where exactly is the benefit if i am using it, instead of just putting all my elements directly to the window?

3) What kind of programming style is a good one? Recently I worked at a very big Java Project and I really liked the structure there. So I am new at EXTjs, and I am searching for a simliar kind of structure.
Is it a good style, to create a new js File for every component I am writing? if so, is there another posibillity, to use all the components in my index.html? Currentyl I am include all the scripts like this: <script lanuage="text/javascript" src="..."></script>

Thank u guys for your help
Chriz
PHP Code:
function createWindow(p_widthp_heightp_title){
    
var 
win = new Ext.Window({
    
    
widthp_width,
    
heightp_height,
    
resizabletrue,
    
maximizabletrue,
    
titlep_title,

    
items:[{
        
xtype:'form'
        
,id:'testform'
        
,defaultType:'textfield'
        
,frame:true
        
,defaults:{anchor:'95%'}
        ,
items:[
            {
                
fieldLabel:'Username:'
                
,id:'username'
            
},
            {
                
fieldLabel:'Password:'
                
,id:'password'
            
}
        ]
        ,
buttons:[{
            
formbind:true,
            
text"moin",
            
handler:function(){
                
Ext.Msg.alert("test");
            }
        }]
    }]
    
})
 
win.show();