title: creating a stroked shape
body: <p>I am having trouble with creating a stroked shape in <code>BasicStroke Outline = new BasicStroke(10f, 50, 50);</code>. The error I am currently getting is error: </p>
  
  <blockquote>
    <p>can't find symbol canvas.setStroke(Outline) pointing to the dot.</p>
  </blockquote>
  
  <p>I am new to constructors so any help would be great and the only thing I did similar to this was creating an instance of <code>Scanner</code>.</p>
  
  <pre><code>import javax.swing.JFrame;
  import java.awt.Graphics;
  import java.awt.Color; //sets color
  import java.awt.BasicStroke;
  import java.awt.Graphics2D;
  public class ColoredOlypmicRings extends JFrame
  {
   //varriables go here
  
  
  public void paint(Graphics canvas)
  {
   super.paint (canvas);
  
  canvas.setColor(Color.green);
  canvas.drawOval(100,100,100,100); //color green
  canvas.setColor(Color.red);
  canvas.drawOval(200,200,100,100); //color red
  final BasicStroke Outline = new BasicStroke(10f, 50, 50);
  canvas.setStroke(Outline);
  
  canvas.drawOval(300,300,200,200);
  }
  
   public ColoredOlypmicRings()
   {
   setSize(600,400);
  setDefaultCloseOperation(EXIT_ON_CLOSE);
   }
  
  public static void main(String[] args)
  {
   ColoredOlypmicRings guiWindow = new ColoredOlypmicRings();
  guiWindow.setVisible(true);
   }
  }
  </code></pre>