public void buildTiles() {
		this.removeAll();
		int gridSize = grid.getSize();

		//set layout to a grid of length sqrt(grid size)
		this.setLayout(new GridLayout(0,(int)Math.sqrt(gridSize)));
		buttons = new JButton[gridSize];
		for(int i=0; i<gridSize; i++) {
			//initially all buttons are blank
			JButton jb = new JButton(imgBlank);

			buttons[i] = jb;
			jb.addActionListener(new ButtonListener(i));

			//get rid of annoying boxes appearing around icon next to clicked icon
			jb.setFocusPainted(false);
			jb.setFocusable(false);
			this.add(jb);
		}
		this.repaint();
		this.validate();

	}