Q:

Cocoa: HUD Window in center of Main window

How to do that my HUD Window panel (Second window) will be in front of Main Window (first-main Window) in center?  Just like a child window to move with the parent window (Main Window). 
Main Window is sizable and movable.. so when I orderFront or makeKeyAndOrderFront my HUD Window panel is displaying by coords of screen, but not by Main Window. 

A:

Solution A: before showing the HUD, set its frame to the appropriate position in the middle.  If the user moves the main window, adjust the HUD as well. 
Solution B: make the HUD a child window with the [parentWindow addChildWindow:hudWindow ordered: NSWindowAbove]; call.