StrokeStyleCanvas.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- package StrokeStyle;
- import javax.microedition.lcdui.*;
- import javax.microedition.midlet.*;
- import java.io.*;
- public class StrokeStyleCanvas extends Canvas
- {
- public StrokeStyleCanvas()
- {
- }
- public void paint(Graphics g)
- {
- g.setColor(0xFFFFFF);
- g.fillRect(0, 0, getWidth(), getHeight());
- g.setColor(0x0FF000);
- g.setStrokeStyle(Graphics.SOLID);
- g.drawLine(0,30,120,30);
- g.drawLine(10,20,20,80);
- g.setStrokeStyle(Graphics.DOTTED);
- g.drawLine(10,20,100,20);
- g.drawLine(5,50,5,50);
- }
- }