Cannot find symbol - method setColor(java.awt.Color)?
<p>I am attempting to create a new color palette for an image turned to gray scale, and then apply the palette to the gray scale image. I began the method that I wanted to use to apply the palette, but I ran into the error mentioned in the title. I used "java.awt.Color" already in my code, so I am not sure why I am getting the error. Also, as you will see, I placed a color inside the parenthesis.</p>

<pre><code>/**
 * This program takes an image, converts it to grayscale, and uses a color palette to create new colors for the image. 
 * 
 * @author Dylan Hubbs 
 * @version 08/02/16
 */
import java.awt.Color ;
class ColorPalette
{
    public void grayscaleEffect(Picture pictureObj)
    {
        int redValue = 0; int greenValue = 0; int blueValue = 0;
        Pixel grayscaleTargetPixel = new Pixel(pictureObj, 0,0);
        Color grayscalePixelColor = null;

        for(int y=0; y &lt; pictureObj.getHeight(); y++)
        {
            for(int x = 0; x &lt; pictureObj.getWidth(); x++)
            {
                grayscaleTargetPixel = pictureObj.getPixel(x,y);
                grayscalePixelColor = grayscaleTargetPixel.getColor();                    //gets the color of the target pixel
                grayscalePixelColor = new Color((grayscaleTargetPixel.getRed() + grayscaleTargetPixel.getGreen() + grayscaleTargetPixel.getBlue()) / 3, (grayscaleTargetPixel.getRed() + grayscaleTargetPixel.getGreen() + grayscaleTargetPixel.getBlue()) / 3, (grayscaleTargetPixel.getRed() + grayscaleTargetPixel.getGreen() + grayscaleTargetPixel.getBlue()) / 3);

                grayscaleTargetPixel.setColor(grayscalePixelColor);                       //sets the new color of the target pixel
            }//end of the inner for loop
        }//end of the outer for loop

        pictureObj.explore();                                           //explore the Picture object which is now the altered image
        pictureObj.write("grayscaleWashingtonMonument.jpg");                  //write the altered Picture object to a new file
        pictureObj.show();
    }

    public void paletteEffect(Picture pictureObj)
    {
        int redValue = 0; int greenValue = 0; int blueValue = 0;
        Pixel paletteTargetPixel = new Pixel(pictureObj, 0,0);
        Color palettePixelColor = null;
        Color [] palette = {Color.RED, Color.BLUE, Color.CYAN, Color.GREEN, Color.YELLOW, Color.GRAY, Color.PINK, Color.ORANGE};
        for(int y=0; y &lt; pictureObj.getHeight(); y++)
        {
            for(int x = 0; x &lt; pictureObj.getWidth(); x++)
            {
                paletteTargetPixel = pictureObj.getPixel(x,y);
                palettePixelColor = paletteTargetPixel.getColor();
                if(paletteTargetPixel.getRed() &gt;= 1 &amp;&amp; paletteTargetPixel.getRed() &lt;= 31)
                palettePixelColor.setColor(palette[0]);
                else if(paletteTargetPixel.getRed() &gt;= 32 &amp;&amp; paletteTargetPixel.getRed() &lt;= 62)
                palettePixelColor.setColor(palette[1]);
                else if(paletteTargetPixel.retRed() &gt;= 63 &amp;&amp; paletteTargetPixel.getRed() &lt;=93)
                palettePixelColor.setColor(palette[2]);
            }
        }
    }
}
public class ColorPaletteTester
{
    public static void main(String[] args)
    {
        Picture pictureObj = new Picture("washingtonmonument.jpg");     //creates a new Picture object representing the file in the parameter list                 
        pictureObj.explore();
        ColorPalette cp = new ColorPalette();

        cp.grayscaleEffect(pictureObj);
        cp.paletteEffect(pictureObj);
    }
}
</code></pre>

<p>So, the error is coming at </p>

<pre><code>palettePixelColor.setColor(palette[0]);
</code></pre>

<p>Does anyone know why this would be happening?</p>