Electrofriends

Java applet program that allows the user to draw lines, rectangles and ovals

by Ranjith | October 4th, 2009.
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

Java applet progrme for draw lines, circle, rectangle

Share and Enjoy:
  • Digg
  • Technorati
  • StumbleUpon
  • TwitThis
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Mixx
  • Yahoo! Buzz
  • LinkedIn
  • MySpace
  • FriendFeed
  • NewsVine
  • Netvibes
Similar Posts:

Leave a Reply

Electrofriends Comments
  • Alex: dear,i want to know more about car parking system if you interesting please give some information in addition...
  • Ranjith: You can give a link to this article in your website.
  • ashish: i need to design this car…would you pls send me all the details of it..what all stuff is required every...
  • Rinny Verma: hi………..plz send me the details n specifications of the robot….
  • omar: can u tell me how to control pitman motor using at89s51 through h bridge give ,jut move the motor in forward...
  • Copyright©2009 www.electrofriends.com All Rights Reserved. Powered by Dhyeya