Grid problems with grid.java