中国开发网: 论坛: 程序员情感CBD: 贴子 248726
狒狒
重载了.
public MyCanvas(Composite arg0, int arg1)
{
super(arg0, arg1);
addPaintListener(new PaintListener () {
public void paintControl(PaintEvent event){

GC gc = event.gc;
gc.setBackground(new Color(null, 0,0,0));
gc.setForeground(red);
Rectangle rect = getClientArea();
gc.fillRectangle(rect.x,rect.y,rect.width, rect.height);
}
});

}


生活不是你呼吸了多少空气,生活是那些令你无法呼吸的时刻


相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录