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

J2ME

开发平台:

Java

  1. package DrawRoundRect;
  2. import javax.microedition.lcdui.*;
  3. import javax.microedition.midlet.*;
  4. import java.io.*;
  5. public class RoundRectCanvas extends Canvas
  6. {
  7. public RoundRectCanvas()
  8.         {
  9.     
  10.         }
  11.         public void paint(Graphics g)
  12.         {
  13.         g.setColor(0xFFFFFF);
  14.         g.fillRect(0, 0, getWidth(), getHeight());
  15.         g.setColor(0x000000);
  16.         g.drawRoundRect(30,40,120,120,20,10);
  17.         g.setColor(0x00FF00);
  18.         g.fillRoundRect(60,70,30,60,30,30);
  19.         }
  20. }