String counter = new Integer(paintCount).toString(); Point extent = gc.stringExtent(counter); gc.drawString(counter, cx + (size.x - extent.x) / 2, cy + (size.y - extent.y) / 2);
gc.drawRectangle(cx + (size.x - 10) / 2, cy + (size.y - 10) / 2, 10, 10);
			public void paintControl(PaintEvent e) {				paintCount++;				GC gc = e.gc;				if (fillDamageButton.getSelection ()) {					Color color = e.display.getSystemColor (colors [paintCount % colors.length]);					gc.setBackground(color);					gc.fillRectangle(e.x, e.y, e.width, e.height);				}				Point size = canvas.getSize ();				gc.drawArc(cx + 1, cy + 1, size.x - 2, size.y - 2, 0, 360);				String counter = new Integer(paintCount).toString();				Point extent = gc.stringExtent(counter);				gc.drawString(counter, cx + (size.x - extent.x) / 2, cy + (size.y - extent.y) / 2);			}