1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import java.awt.*; import java.applet.*; /* <applet code="Sujith" width=200 height=200> </applet> */ public class Sujith extends Applet { public void paint(Graphics g) { for(int i=0;i<=250;i++) { Color c1=new Color(35-i,55-i,110-i); g.setColor(c1); g.drawRect(250+i,250+i,100+i,100+i); g.drawOval(100+i,100+i,50+i,50+i); g.drawLine(50+i,20+i,10+i,10+i); } } } |
Output:

Java applet progrme for draw lines, circle, rectangle
Description :
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya
April 13th, 2010 at 12:12 am
thanq
April 16th, 2011 at 2:13 pm
sir tell me about java applet, how to run applet program and what we need run of java program.
September 16th, 2011 at 11:57 am
I that your task i want to do like this can you guide me
September 16th, 2011 at 11:58 am
I like that your task i want to do like this can you guide me
November 14th, 2011 at 7:33 am
first of all u need jdk i.e java development kit and then a program compiler try blue j its free and easy to use
January 30th, 2012 at 2:16 pm
I like so much your program……………
pls guide me …..