Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to draw a circular Arc2D

Java: How to draw a circular Arc2D
{filelink=9433}

 import java.awt.*;
 import java.awt.geom.*;
 import  javax.swing.*;
 class ArcCirculaire extends JFrame {
	public ArcCirculaire()
	{
	setTitle("Java 2D");
    setSize(200, 200);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
	}
   public void paint(Graphics g)
   	{
   Graphics2D g2 = (Graphics2D)g;
   Arc2D arc_pi = new Arc2D.Float(0, 50, 150, 150, -30, 90, Arc2D.PIE);
   g2.setPaint(Color.blue);
   g2.fill(arc_pi);
   }	
 public static void main(String[] args)
  {
   new ArcCirculaire();
  }
}

Users who found this page were searching for:

  • perl directory listing
  • python iterate dict key value
  • java font underline
  • python list sockets
  • attach a file python email
  • blues java arc2d exemple
  • python find number of occurrences
  • create an instance in python
  • calculate percentage in python
  • python iterate dict

No comments yet.

Leave a Comment