Update ButtonPanelController.java

added validate() function