This function is currently not documented; only the argument list is available.
If panel is null, returns the top panel in the stack.