title: Setting a Random Color
body: <p>I am having trouble setting up a random color using a class constant.  </p>
  
  <p>When I run the program, (this is just  small part of the code) it gives me </p>
  
  <blockquote>
    <p>method setColor in class Graphics cannot be applied to given types</p>
  </blockquote>
  
  <p>I am very unfamiliar with how to set colors, can someone please explain?</p>
  
  <pre><code> public static final int COLOR = (int) (Math.random() * 256);
  
      for(int i = 1; i &lt;= count; i++)
                  {
                      g.setColor(new Color(COLOR), (COLOR), (COLOR));
                      g.drawLine(r.nextInt(MIDX), r.nextInt(MIDY), r.nextInt(MIDX), r.nextInt(MIDY));
                  }
  </code></pre>