title: JMenuBar won't show up in JFrame
body: <p>I know this question has been asked a lot but nothing seems to be working for me so I'll ask again. I'm trying to get a JMenuBar, with a JMenu, to show up in my Window class which extends JFrame. Here is my relevant code:</p>
  
  <pre><code>public class Window extends JFrame {
      //class variables
      JMenuBar menuBar;
      JMenu menu;
  
      Window() throws IOExcpetion {
  
      menuBar = new JMenuBar();
      menu = new JMenu("A Menu");
      menuBar.add(menu);
      this.setJMenuBar(menuBar);
      this.add(menuBar); //I've tried with and without this
      menu.setVisible(true);
      menuBar.setVisible(true);
  
      this.setVisible(true);
  
      while(true) {
          repaint(); //my paint method doesn't touch the JMenuBar or JMenu
      }
  }
  </code></pre>