blackberry ui api用java怎样画一个矩形啊?????
求高手指点 怎么画矩形或花线
package com.WildCat.Listener2;
import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.XYPoint;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.XYRect;
import net.rim.device.api.ui.component.Status;
import net.rim.device.api.ui.container.MainScreen;
public class Test1_2 extends UiApplication {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new Test1_2().enterEventDispatcher();
}
public Test1_2()
{
pushScreen(new HelloWorldScreen());
}
final class HelloWorldScreen extends MainScreen{
public Graphics graphics = getGraphics();
public void draw(Graphics graphics)
{
Bitmap bg1 = new Bitmap(1000,500);
Graphics g2 = Graphics.create(bg1);
g2.setColor(Color.BLACK);
g2.drawArc(100, 100, 100, 100, 20, 200);
g2.fillArc(100, 100, 100, 100, 20, 200);
g2.popContext();
}
}
}
[解决办法]
该回复于2012-09-11 16:06:13被版主删除