import java.awt.*;
import javax.swing.*;
public class Olympic extends JApplet{
public void paint(Graphics g){
g.setColor(Color.blue);
g.drawOval(10,10,100,100);
g.setColor(Color.yellow);
g.drawOval(60,60,100,100);
g.setColor(Color.black);
g.drawOval(120,10,100,100);
g.setColor(Color.green);
g.drawOval(180,60,100,100);
g.setColor(Color.red);
g.drawOval(230,10,100,100);
}
}
Output will be like:
Very informative article.Thank you author for posting this kind of article .
ReplyDeletehttp://www.wikitechy.com/view-article/applet-program-in-java-with-example
Both are really good,.
Cheers,
Venkat