public void setTexture(Paint obj)
    {
        if (obj instanceof GradientPaint)
        {
            texture = new GradientPaint(0, 0, Color.white, getSize().width * 2, 0, Color.green);
        }
        else
        {
            texture = obj;
        }
    }
public void setTexture(Paint obj)
    {
        if (obj instanceof GradientPaint)
        {
            texture = new GradientPaint(0, 0, Color.white, getSize().width * 2, 0, Color.green);
        }
        else
        {
            texture = obj;
        }
    }
public void setTexture ( Paint obj ) { if ( obj instanceof GradientPaint ) { texture = new GradientPaint ( 0 , 0 , Color . white , getSize ( ) . width * 2 , 0 , Color . green ) ; } else { texture = obj ; } }
Sets the kind of paint to use. For the image background?

@param obj The paint to use.
Sets the kind of paint to use . For the image background?