title: Java SWT: Composite vs Shell
body: <p>In a Java SWT lab I had previously, it talks about using Composites then adding the <code>main()</code></p>
  
  <pre><code>public static void main(String[] args){
      Display display = new Display();
      Shell shell = new Shell(display);
      Calculator calc = new Calculator(shell, SWT.NONE);
      calc.pack();
      shell.pack();
      shell.open();
      while(!shell.isDisposed()){
              if(!display.readAndDispatch()) display.sleep();
      }
  } 
  </code></pre>
  
  <p>But why do it this way. Shouldn't I use a Shell? What might be the reasons for this?</p>