Program to design an applet which draws a circle (having color BLUE) inside a triangle (having color YELLOW)
Given program will draw a circle inside a triangle. The color of circle is "blue" and triangle having color "yellow". To fill circle with respective colours first we have to set the colour using setColor(Color c) method of Graphics class and then use the fillPolygon() and fillOval( ) method. The fillPolygon( ) method Fills a closed polygon defined by arrays of x and y coordinates.