Adding a panel to the top of a window

Hi all,

I’d like to create a new panel. The Panel Simple template is fine, but the panel ends up at the bottom of the window. How can I move it to the top?

… Ah, I have just noticed I can move it manually using the mouse. Is there a way to do that programmatically?