private void createMenuBar() throws InstantiationException {
        
        // Create the main
        JMenuBar mainBar = new JMenuBar();
        
        // Create the file menu items.
        JMenu fileMenu = new JMenu("File");
        mainBar.add(fileMenu);
        
        JMenuItem closeMenuItem = new JMenuItem("Close");
        fileMenu.add(closeMenuItem);
        closeMenuItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				MainForm.this.dispose();
			}
        });
        
        // Add the services to the menu items.
        JMenu serviceMenu = new JMenu("Services");
        mainBar.add(serviceMenu);
        try {
			JMenuItem item = new JMenuItem("Add Query");
			item.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent event) {
					try {
						MainForm.this.addServiceTab();
					} catch(Exception e) {
						JOptionPane.showMessageDialog(MainForm.this, e.getMessage(), "Error creating query.", JOptionPane.ERROR_MESSAGE);
					}
				}
			});
			serviceMenu.add(item);
		} catch (Exception e) {
			logger.error("Unable to load service methods.", e);
		}
        
        if(serviceMenu.getItemCount() == 0) {
        	logger.error("No services loaded.");
        }

        setJMenuBar(mainBar);
        
        // Set the layout for the tab panel.
        GroupLayout layout = new GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGap(700)
            .addComponent(this.tabs)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGap(300)
            .addComponent(this.tabs)
        );
        
        this.setMinimumSize(new Dimension(500, 500));
        pack();
    }