void createCanvas(Composite parent) {
	int style = SWT.NO_BACKGROUND;
	if (dbItem.getSelection()) style |= SWT.DOUBLE_BUFFERED;
	canvas = new Canvas(parent, style);
	canvas.addListener(SWT.Paint, new Listener() {
		public void handleEvent(Event event) {
			GC gc = event.gc;
			Rectangle rect = canvas.getClientArea();			
			Device device = gc.getDevice();
			Pattern pattern = null;
			if (background.getBgColor1() != null) {
				if (background.getBgColor2() != null) { // gradient
					pattern = new Pattern(device, 0, 0, rect.width, 
							rect.height,
							background.getBgColor1(),
							background.getBgColor2());
					gc.setBackgroundPattern(pattern);
				} else {	// solid color
					gc.setBackground(background.getBgColor1());
				}
			} else if (background.getBgImage() != null) {		// image
				pattern = new Pattern(device, background.getBgImage());
				gc.setBackgroundPattern(pattern);
			}
			gc.fillRectangle(rect);
			GraphicsTab tab = getTab();
			if (tab != null) tab.paint(gc, rect.width, rect.height);
			if (pattern != null) pattern.dispose();
		}
	});
}