private void drawPieces(int imageWidth, int imageHeight, Graphics g) 
	{	  
		for(int y = 0; y < boardSize; y++)
        {
			for(int x = 0; x < boardSize; x++)
	        {				
                Piece piece = controller.getPieceFromBoard(x, y);
                
                String pieceName = piece.getPieceName();
                String pieceColor = piece.getPieceColor();
                String pieceFileName = pieceColor + pieceName + ".png";
                
                if(piece.getPieceType() != "-")
                {
	                Image pieceImage = null;
	        		try 
	        		{
	        			pieceImage = ImageIO.read(new File(pieceFileName));
	        		} 
	        		catch (IOException e) 
	        		{
	        			System.out.println("Please input a proper image file!");
	        		}
	        		
	        		g.drawImage(pieceImage, (getWidth()*x/boardSize), (getHeight()*(7-y)/boardSize), imageWidth, imageHeight, null);
                }
            }
        }
	}