public void setPiece(Piece p) {
		//if setting to an empty square, just remove icon and return
		if(p.getColor() == PieceColor.None) {
			setIcon(null);
			return;
		}
		
		
		//otherwise create the path to the image and display it
		String st = "images/";
		
		if(p.getColor() == PieceColor.White) st += "w";
		else if(p.getColor() == PieceColor.Black) st += "b";
		
		if(p.getName().equals("Pawn")) st += "p.png";
		else if(p.getName().equals("King")) st += "k.png";
		else if(p.getName().equals("Knight")) st += "n.png";
		else if(p.getName().equals("Bishop")) st += "b.png";
		else if(p.getName().equals("Queen")) st += "q.png";
		else if(p.getName().equals("Rook")) st += "r.png";
		else {
			System.out.println("Something went wrong.");
			System.exit(0);
		}
		
		setIcon(new ImageIcon(getClass().getResource(st)));
			
	}