Update ButtonAccept.java

Prevented ArrayOutOfBounds Exception