if panel would go off botom of screen, align the botom to window