title: Can't add JMenuBar to Applet
body: <p>I'm trying to add a menu to my <code>Applet</code> however I get a compilation error. I can't figure out why. Can someone help me?</p>
  
  <pre><code>import java.applet.*;
  import javax.swing.*;
  import java.awt.*;
  public class app extends Applet {
  
      public void init() {
          JMenuBar menuBar = new JMenuBar ();
          JMenu menu = new JMenu ("Help");
          menuBar.add(menu);
          JMenuItem   mItem = new JMenuItem ("Log out");
          menu.add(mItem);
          this.setJMenuBar(menuBar);
      }
  }
  </code></pre>