private void setPieceToMove(ChessPiece p)
	{		
		if ((p == null) || (p.getColor() != turn))
			return;

		// if there was a previous set of moves,
		//  reset the UI from it
		this.removeMoveHighlights();
		
		moves_from = p.nextMoves(this);
		if (moves_from == null)
		{
			System.out.printf("No valid moves for piece at [%c,%c]\n", p.getPosition().getBoardCol(), p.getPosition().getBoardRow());
			return;
		}
		
		from = p.getPosition();
		try
		{
			for (int k = 0; k < moves_from.getCount(); k++)
			{
				ChessPosition new_pos = moves_from.getMove(k);
				ChessMoves.MoveType mt = moves_from.moveType(k);
				int idx = ((new_pos.getRow()+1)*9)+(new_pos.getCol()+1);
				JLabel jl = (JLabel)board_ui.getContentPane().getComponent(idx);
				if (jl != null)
				{
					if (mt == ChessMoves.MoveType.NORMAL)
						jl.setBackground(Color.GREEN);
					else if (mt == ChessMoves.MoveType.CAPTURE)
						jl.setBackground(Color.RED);
				}
			}
		}
		catch (ChessException ce)
		{
			System.out.println(ce.getMessage());
		}
	}