import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; public class PathBugDemo { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.addListener(SWT.Paint, new Listener() { public void handleEvent(Event event) { GC gc = event.gc; Path path = new Path(display); gc.drawPath(path); gc.drawRoundRectangle(10, 10, 100, 100, 10, 10); path.dispose(); } }); shell.setSize(300, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }