Total members 11893 |It is currently Tue Nov 05, 2024 10:25 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Draw An Arc in using java
Code:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.geom.*;

public class 
DrawAnArc extends JApplet {
  
BasicStroke basicStroke = new BasicStroke(5.0f);  
    public 
void paint(Graphics g) {
    
Graphics2D g2d = (Graphics2Dg;
    
g2d.setPaint(Color.red);
    
g2d.setStroke(basicStroke);
    
g2d.draw(new Arc2D.Double(51015015060150,
        
Arc2D.OPEN));
    }
  public static 
void main(String s[]) {
    
JFrame frame = new JFrame("Draw Arc");
    
JApplet applet = new DrawAnArc();
    
frame.getContentPane().add("Center"applet);
    
frame.setSize(300250);
    
frame.show();
  }





Attachments:
File comment: Draw arc in Java
arc.gif
arc.gif [ 4.63 KiB | Viewed 15803 times ]

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada
Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Draw An Arc in java
 Draw Flag in Java     -  
 draw Calendar in java     -  
 draw Oval in java     -  
 draw text effects in java     -  
 Draw Dashed Oval in java     -  
 Changing the color of a graph draw in java     -  
 Java code to draw shortest path tree     -  
 draw cube 3d java-Cube 3D     -  
 How to draw a gun     -  
 Draw pie chart php     -  



Topic Tags

Java Graphics
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com