Thursday, 25 September 2014

Program for Olympic Applet


import java.awt.*;
import java.applet.*;
public class Olympic_Applet extends Applet
{
    public void init()
    {
        setBackground(Color.gray);
    }

    public void paint(Graphics g)
    {
        g.setColor(Color.blue);
        g.drawOval(50,50,100,100);

        g.setColor(Color.black);
        g.drawOval(120,50,100,100);

        g.setColor(Color.red);
        g.drawOval(190,50,100,100);

        g.setColor(Color.yellow);
        g.drawOval(85,120,100,100);

        g.setColor(Color.green);
        g.drawOval(155,120,100,100);
    }
}

/*


*/
Output

No comments:

Post a Comment