aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to make circle? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to make circle?" Watch "How to make circle?" New topic
Author

How to make circle?

Rohit Ramnath
Greenhorn

Joined: May 08, 2006
Posts: 6
hi,
i need to make a circle when i click a button. how can i do that using applet?
yunuss khan
Greenhorn

Joined: Apr 22, 2006
Posts: 17
hi,

try this...

import java.awt*;

import java applet Applet;


Public class Circle extends Applet

{

Public void paint (Graphics g)


{


g.setColor (Color.red); // sets color red


g.fillOval (100,100,50,50); //Draws circle with loacation 100,100, and diam 50


} // method paint


} // class circe

Regards,
yunus
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
... but where's the button?


There is no emoticon for what I am feeling!
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
If you are interested in graphics, take the tutorial:
http://java.sun.com/docs/books/tutorial/2d/index.html
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

I think I'll move this to our GUI forum where all things graphics are discussed.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make circle?