What is the purpose of using setMaximumSize() here?