RoundRectCanvas.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:0k
源码类别:
J2ME
开发平台:
Java
- package DrawRoundRect;
- import javax.microedition.lcdui.*;
- import javax.microedition.midlet.*;
- import java.io.*;
- public class RoundRectCanvas extends Canvas
- {
- public RoundRectCanvas()
- {
- }
- public void paint(Graphics g)
- {
- g.setColor(0xFFFFFF);
- g.fillRect(0, 0, getWidth(), getHeight());
- g.setColor(0x000000);
- g.drawRoundRect(30,40,120,120,20,10);
- g.setColor(0x00FF00);
- g.fillRoundRect(60,70,30,60,30,30);
- }
- }