Add opposite-position function

Also, adds the function to the panel Component for internal use.