public JMenuBar createMenuBar()
   {
      menuBar = new JMenuBar();
      JMenu file = new JMenu("File");
      menuBar.add(file);

      JMenuItem newMenuItem = new JMenuItem(
         new AbstractAction("New")
         {
            @Override
            public void actionPerformed(ActionEvent actionEvent)
            {
               newFile();
            }
         }
      );

      JMenuItem openMenuItem = new JMenuItem(
         new AbstractAction("Open")
         {
            public void actionPerformed(ActionEvent e)
            {
               int returned = fileChooser.showOpenDialog(getFrame());
               if (returned == JFileChooser.APPROVE_OPTION)
               {
                  openFile(fileChooser.getSelectedFile());
               }
            }
         }
      );

      JMenuItem saveMenuItem = new JMenuItem(
         new AbstractAction("Save")
         {
            public void actionPerformed(ActionEvent e)
            {
               int returned = fileChooser.showSaveDialog(getFrame());
               if (returned == JFileChooser.APPROVE_OPTION)
               {
                  try
                  {
                     JTextArea textArea = (JTextArea) getCurrentlySelectedComponent();
                     BufferedWriter writer = new BufferedWriter(new FileWriter(fileChooser.getSelectedFile()));
                     textArea.write(writer);
                     writer.close();
                  }
                  catch (IOException e1)
                  {
                     e1.printStackTrace();
                  }
               }
            }
         }
      );

      JMenuItem closeFileMenuItem = new JMenuItem(
         new AbstractAction("Close")
         {
            @Override
            public void actionPerformed(ActionEvent e)
            {
               tabbedPane.remove(getCurrentTabComponent());
            }
         }
      );

      JMenuItem settingsMenuItem = new JMenuItem(
         new AbstractAction("Settings")
         {
            @Override
            public void actionPerformed(ActionEvent actionEvent)
            {
               new SettingsWindow(WindowConstants.DISPOSE_ON_CLOSE);
            }
         }
      );

      JMenuItem quitMenuItem = new JMenuItem(
         new AbstractAction("Quit")
         {
            @Override
            public void actionPerformed(ActionEvent actionEvent)
            {
               Aluminum.getIDE().performShutdown();
            }
         }
      );

      file.add(newMenuItem);
      file.add(openMenuItem);
      file.add(saveMenuItem);
      file.add(closeFileMenuItem);
      file.addSeparator();
      file.add(settingsMenuItem);
      file.addSeparator();
      file.add(quitMenuItem);

      JMenu edit = new JMenu("Edit");
      menuBar.add(edit);

      JMenuItem cutMenuItem = new JMenuItem(
         new AbstractAction("Cut")
         {
            @Override
            public void actionPerformed(ActionEvent actionEvent)
            {
               if (isEditorActive())
               {
                  ((JTextArea) getCurrentlySelectedComponent()).cut();
               }
            }
         }
      );

      JMenuItem copyMenuItem = new JMenuItem(
         new AbstractAction("Copy")
         {
            @Override
            public void actionPerformed(ActionEvent actionEvent)
            {
               if (isEditorActive())
               {
                  ((JTextArea) getCurrentlySelectedComponent()).copy();
               }
            }
         }
      );

      JMenuItem pasteMenuItem = new JMenuItem(
         new AbstractAction("Paste")
         {
            @Override
            public void actionPerformed(ActionEvent e)
            {
               if (isEditorActive())
               {
                  ((JTextArea) getCurrentlySelectedComponent()).paste();
               }
            }
         }
      );

      JMenuItem selectAllMenuItem = new JMenuItem(
         new AbstractAction("Select All")
         {
            @Override
            public void actionPerformed(ActionEvent e)
            {
               if (isEditorActive())
               {
                  ((JTextArea) getCurrentlySelectedComponent()).selectAll();
               }
            }
         }
      );

      edit.add(cutMenuItem);
      edit.add(copyMenuItem);
      edit.add(pasteMenuItem);
      edit.add(selectAllMenuItem);

      return menuBar;
   }