A typical SWT sample code looks like the following code:
final Display display = Display.getDefault();
final Shell shell = createMyShell(display);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
What is the difference between Display and Shell?
If multiple windows have to be shown, does each one need an own loop?
Yes, if you have to show multiple windows (shells), you must have a loop for each one.
But there is only one
Displayobject in an application that you need to create.