title: How should a minimal Java program look like?
body: <p>I wrote the following code:</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  
  class Party {
      public void buildInvite() {
          Frame f = new Frame();
          Label l = new Label("Party at Tim's");
          Button b = new Button("You bet");
          Button c = new Button("Shoot me");
          Panel p = new Panel();
          p.add(l);
      } //more code here...
  }
  </code></pre>
  
  <p>I keep getting the following error: <code>Exception in thread "main" java.lang.NoSuchMethodError: main</code></p>
  
  <p>I've tried to add an additional <code>main (String[] args)</code> to the code but I still get the same errors.</p>
  
  <p>What additionally I should put in the code and where in the layout should it go?</p>