package swt.bugs; import org.eclipse.draw2d.SWTGraphics; import org.eclipse.swt.SWT; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.Path; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class Bug328801 { public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.setText("Shell"); shell.addPaintListener(new PaintListener() { public void paintControl(PaintEvent e) { Path path = new Path(Display.getCurrent()); float x = 472.0f; float y = 72.0f; float height = 17.0f; float width = 17.0f; path.moveTo(x, y); path.addArc(x, y, width, height, 0, 360); SWTGraphics g = new SWTGraphics(e.gc); g.setBackgroundColor(Display.getCurrent().getSystemColor( SWT.COLOR_BLACK)); g.setAntialias(1); g.setLineWidth(2); g.fillPath(path); path.dispose(); } }); shell.setSize(600, 380); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }