IT. Expert System.

Java basics

drawArc()


Returns DrawArc for a circular or elliptical arc covering the specified rectangle.

Syntax:
public DrawArc(int x,
               int y,
               int width,
               int height,
               int startAngle,
               int arcAngle)


Example:

/*
        Draw Arc in Applet Window Example
        This java example shows how to draw arc in an applet window using
        drawArc method of Graphics class. It also shows how to draw a filled
        arcs using fillArc method of Graphics class.
*/
 
/*


*/
 
 
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
 
public class DrawArcExample extends Applet{
 
        public void paint(Graphics g){
               
                //set color to red
                setForeground(Color.red);
               
                /*
                 * to draw an arc in an applet window use,
                 * void drawArc(int x1,int y1, int width, int height,int startAngle, int arcAngle)
                 * method.
                 *
                 * This method draws an arc of specified width and
                 * height at (x1,y1)
                 */
               
                //this will draw an arc of width 50 & height 100 at (10,10)
                g.drawArc(10,10,50,100,10,45);
               
               
                /*
                 * To draw a filled arc use
                 * fillArc(int x1,int y1, int width, int height,int startAngle, int arcAngle)
                 * method of Graphics class.
                 */
               
                //draw filled arc
                g.fillArc(100,10,100,100,0,90);
               
        }
}


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1142 / 158860190. Delta: 0.03661 с