Category Archives: JavaME(J2ME)

Java Platform Micro Edition

JavaME常用小技巧集合[持续补充中]

1. 绘制图像缓冲区

[java]
Image img = Image.createImage( width, height );
canvs.paint( img.getGraphics() );
[/java]

 


 

2. 绘制透明图案、色块

[java]
int [] argb = new int[width * height];
for ( int i = 0; i < argb.length; i++ ) {
argb[i] = 0x99000000; // ARGB
}
graphics.drawRGB(argb, 0, width, 0, 0, width, height, true);
[/java]

 


 

3. Netbeans中Java(TM) Platform Micro Edition SDK 3.0的存储目录在哪里?

DefaultCldcPhone1:

C:\Documents and Settings\[USERNAME]\javame-sdk\3.0\work\6\appdb\filesystem\root1

Read: 1237