mywin
is a reference to a window object that you created. This is just a normal JS construct using variable assignment.
Ext.getCmp('mywin')
attempts to look up a component that has an id
property of mywin
. It's typically a good idea to avoid using Ext.getCmp
unless you'll only ever be creating once instance of the component, since it must be globally unique.