Implemented checking current window maximized state and setting this value when switching JPanels so the window stays maximized.