
I want to know what I should use to draw the mouth and eyes of the above smiley. so far I have managed to draw something behind my eyes and mouth (look at the result so far). I tried using Arc2D.double, as you can see in the code down, marked as a comment.
Here is what I have done so far:
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);
RESULT SAVE:

source share