 <p>You need to call <code>display.readAndDispatch()</code> to read the events from the event queue and act on them (dispatch).</p> <p>Even the the deactivate event from the <code>Shell</code> must be dispatched!</p> <p>All SWT based application have an event loop as the one you have added to your post. Have a look at the <a href="http://www.eclipse.org/swt/snippets/" rel="nofollow">SWT Snippets</a> for more examples.</p>