pigprince ·
·
阅读: 930
你到底是用的swt还是awt?
protected Canvas createCanvas(Composite parent, int style,
PaintListener pl) {
Canvas c = new Canvas(parent, style);
if (pl != null) {
c.addPaintListener(pl);
}
return c;
}
protected Canvas createCanvas(Composite parent, PaintListener pl) {
return createCanvas(parent, SWT.NONE, pl);
}
参考一下这个文章,是说swt的:
http://www-128.ibm.com/developerworks/cn/opensource/os-jface3/