final Display display = new Display();
final Shell shell = new Shell(display, SWT.NO_TRIM);
Region region = new Region();
region.add(createCircle(50, 50, 50));
region.subtract(createCircle(50, 50, 20));
shell.setRegion(region);
shell.setSize(region.getBounds().width, region.getBounds().height);
shell.setBackground(display.getSystemColor(SWT.COLOR_BLUE));
Button button = new Button(shell, SWT.PUSH);
button.setText("Exit");
button.setBounds(35, 6, 35, 20);
button.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
shell.close();
}
});
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
region.dispose();
display.dispose();