import org.eclipse.swt.widgets.*; public class TwoShellDockPopupTest { public static void main(String[] args) { final Display display = new Display(); createShell("Shell 1", display); createShell("Shell 2", display); while (display.getShells().length > 0) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } private static void createShell(String title, Display display) { final Shell shell = new Shell(display); shell.setText(title); shell.setSize(400, 300); shell.open(); } }