private void initMenu()
    {
        JMenu [] menu  = new JMenu[4];
        menu[0]= new JMenu("File");
        menu[1]= new JMenu("Edit");
        menu[2]= new JMenu("Execute");
        menu[3] = new JMenu("Settings");
        JMenuItem jmiOpen = new JMenuItem("Open");
        JMenuItem jmiSave = new JMenuItem("Save");
        JMenuItem jmiClear = new JMenuItem("Clear");
        JMenuItem jmiExit = new JMenuItem("Exit");
        JMenuItem jmiForeground = new JMenuItem("Foreground");
        JMenuItem jmiBackground = new JMenuItem("Background");
        JMenuItem jmiCaret = new JMenuItem("Caret");
        JMenuItem compileProject = new JMenuItem("Compile Program");
        JMenuItem runProject = new JMenuItem("Run Program");
        JMenuItem jmiSettings = new JMenuItem("Configure");
        
        menu[0].add(jmiOpen);
        menu[0].add(jmiSave);
        menu[0].add(jmiClear);
        menu[0].addSeparator();
        menu[0].add(jmiExit);

        menu[1].add(jmiBackground);
        menu[1].add(jmiForeground);
        menu[1].add(jmiCaret);
        
        menu[2].add(compileProject);
        menu[2].add(runProject);
        
        menu[3].add(jmiSettings);
        
        this.add(menu[0]);
        this.add(menu[1]);
        this.add(menu[2]);
        this.add(menu[3]);
       
        
        jmiOpen.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                open();
            }
        });
        jmiSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                save();
            }
        });
        jmiClear.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               
                ((CodeEditor)editor).jta.setText(null);
                
            }
        });
        jmiExit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(1);
            }
        });
        jmiForeground.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              
                Color selectedColor;
                selectedColor = JColorChooser.showDialog(null, "Choose Foreground Color", ((CodeEditor)editor).jta.getForeground());
                if (selectedColor != null) { 
                    
                    ((CodeEditor)editor).jta.setForeground(selectedColor);
                }
            }
        });
        jmiBackground.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Color selectedColor =
                        JColorChooser.showDialog(null, "Choose Background Color", ((CodeEditor)editor).jta.getBackground());
                if (selectedColor != null) {
                    ((CodeEditor)editor).jta.setBackground(selectedColor);
                }
            }
        });
        jmiCaret.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Color selectedColor =
                        JColorChooser.showDialog(null, "Choose Caret Color", ((CodeEditor)editor).jta.getCaretColor());
                if (selectedColor != null) {
                    ((CodeEditor)editor).jta.setCaretColor(selectedColor);
                }
            }
        });
        compileProject.addActionListener(new ActionListener()
        {
            @Override
            public void actionPerformed(ActionEvent ae) {
                ((CodeEditor)editor).compile();
            }
        });
        runProject.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {   System.out.println("Java Run Clicked");
                ((CodeEditor)editor).execute();
            }
        
        });
        jmiSettings.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {   
            	settings = new Settings();
            }
        });


    }