.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> OOPS >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Java program using applet different graphical representation.

Posted By:laptop charles       Posted Date: June 30, 2010    Points: 10    Category: OOPS    URL: http://www.dotnetspark.com  

Different graphical representation
 

It contain circle and rectangle and etc.
import java.awt.*;
import java.applet.*;

public class ch extends Applet
{
public void paint(Graphics a)
{
a.setColor(Color.red);
a.fillRoundRect(100,100,90,60,25,25);
a.setColor(Color.blue);
a.drawRoundRect(80,100,160,80,35,35);
a.setColor(Color.black);
a.fillRoundRect(180,100,20,70,25,25);
a.setColor(Color.black);
a.fillRoundRect(100,160,85,10,20,20);
a.setColor(Color.black);
a.fillRoundRect(95,100,15,70,25,25);
a.setColor(Color.black);
a.fillRoundRect(100,100,95,5,20,20);
}
}

/*
*/

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend