Creating the main panel and add to Window in Code