Given the following code :
class Game() {
private Shell shell;
public Game(Display display,int level)
{
shell.addPaintListener(new ExmaplePaintListener());
shell.setText("Basic shapes");
shell.setSize(900,900);
shell.setLocation(45, 45);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}
}