ArcCanvas.java
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:0k
源码类别:

J2ME

开发平台:

Java

  1. package DrawArc;
  2. import javax.microedition.lcdui.*;
  3. import javax.microedition.midlet.*;
  4. import java.io.*;
  5. public class ArcCanvas extends Canvas
  6. {
  7. public ArcCanvas()
  8.         {
  9.         
  10.         
  11.         }
  12.         public void paint(Graphics g)
  13.         {
  14.         g.setColor(0xFFFFFF);
  15.         g.fillRect(0, 0, getWidth(), getHeight());
  16.         g.setColor(0x000000);
  17.         g.drawArc(5,5,120,60,0,360);
  18.         g.setColor(0x00FFFF);
  19.         g.fillArc(10,10,150,70,30,80);
  20.         
  21.         }
  22. }