title: Java : smiley face
body: <p><a href="https://i.stack.imgur.com/4vf1E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4vf1E.png" alt="Smiley Face"></a> </p>
  
  <p>I want to know what i should use to draw the mouth and eyes of the above smiley face. so far i managed to draw whats behind the eyes and mouth (Look down for the result so far). i tried using Arc2D.double as you can see in the code down marked as a comment.</p>
  
  <p>Here is what i made so far: </p>
  
  <pre><code>import java.awt.geom.*;
  import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  
  public class draw2 extends JPanel
  {
    public void paintComponent(Graphics g)
   {
      super.paintComponent(g);
      Graphics2D g2 = (Graphics2D) g;
      this.setBackground(new Color( 255,255,255));
  
      g.setColor(Color.yellow);
      g.fillOval(100,100,300,300);
  
      g.setColor(Color.white);
      g.fillArc(110,120,250,250,90,180);
  
      g.setColor(new Color (218,165,32));
      g.drawArc(130,110,250,280,90,-180);
  
      g.setColor(Color.yellow);
      g.fillOval(125,105,250,290);
  
     // draw Arc2D.Double
      //g2.setColor(Color.black);
      //g2.fill(new Arc2D.Double(130, 200, 200,150,170, 200, Arc2D.OPEN));
  
  
  }
  
  
      public static void main (String[] args)
      {
          JFrame f = new JFrame("Task 2");
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          draw2 d = new draw2();
          f.add(d);
          f.setSize(600,600);
          f.setVisible(true);
      }
  
  }
  </code></pre>
  
  <p>RESULT SO FAR:</p>
  
  <p><a href="https://i.stack.imgur.com/djAfz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/djAfz.png" alt="enter image description here"></a></p>