Update gui.java

Fixed array issue.