void initializeToolBar() {
        toolbar = new JToolBar();




        f_new = new JButton();
        f_new.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/new.png"))); // NOI18N
        f_new.setToolTipText("New File");
        f_new.setBorderPainted(false);
        f_new.setFocusable(false);
        f_new.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                h.newFile();
            }
        });
        toolbar.add(f_new);

        f_open = new JButton();
        f_open.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/1309349523_folder_add.png"))); // NOI18N
        f_open.setToolTipText("Open File");
        f_open.setFocusable(false);
        f_open.setBorderPainted(false);
        f_open.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                h.openfile();
            }
        });
        toolbar.add(f_open);

        f_save = new JButton();
        f_save.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/1309349552_diskette.png"))); // NOI18N
        f_save.setToolTipText("Save File");
        f_save.setFocusable(false);
        f_save.setBorderPainted(false);
        f_save.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (EditorPane.getTabCount() > 0) {
                    h.savefile();
                } else {
                    appendToPane(statuswindow,"\n Nothing to save",Color.BLACK);
                    statuswindow.setCaretPosition(statuswindow.getText().length());
                }
            }
        });
        toolbar.add(f_save);

        f_exit = new JButton();
        f_exit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/exit.png"))); // NOI18N
        f_exit.setToolTipText("Exit");
        f_exit.setFocusable(false);
        f_exit.setBorderPainted(false);
        f_exit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                h.exit();
            }
        });
        toolbar.add(f_exit);


        e_cut = new JButton();
        e_cut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/1309349801_Cut.png"))); // NOI18N
        e_cut.setToolTipText("Cut");
        e_cut.setFocusable(false);
        e_cut.setBorderPainted(false);
        e_cut.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    h.cut();
                } catch (BadLocationException ex) {
                    Logger.getLogger(FrontEnd.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
        toolbar.add(e_cut);

        e_copy = new JButton();
        e_copy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/1309349791_Copy.png"))); // NOI18N
        e_copy.setToolTipText("Copy");
        e_copy.setFocusable(false);
        e_copy.setBorderPainted(false);
        e_copy.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                h.copy();
            }
        });
        toolbar.add(e_copy);

        e_paste = new JButton();
        e_paste.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/1309349865_edit-paste.png"))); // NOI18N
        e_paste.setToolTipText("Paste");
        e_paste.setFocusable(false);
        e_paste.setBorderPainted(false);
        e_paste.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                h.paste();
            }
        });
        toolbar.add(e_paste);



        r_runFile = new JButton();
        r_runFile.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/1309349207_player_play.png"))); // NOI18N
        r_runFile.setToolTipText("Run File");
        // r_runFile.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));

        r_runFile.setFocusable(false);
        r_runFile.setBorderPainted(false);
        r_runFile.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                h.run();
            }
        });
        toolbar.add(r_runFile);

        r_stepInto = new JButton();
        r_stepInto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/StepInto.png"))); // NOI18N
        r_stepInto.setToolTipText("Step Into ");
        r_stepInto.setFocusable(false);
        r_stepInto.setBorderPainted(false);
        r_stepInto.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                FrontEnd.appendToPane(FrontEnd.statuswindow,"Debugging Mode Activated \n",Color.BLACK);
                h.stepinto();
            }
        });
        toolbar.add(r_stepInto);
        
        r_stepOut = new JButton();
        r_stepOut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/stepout.png"))); // NOI18N
        r_stepOut.setToolTipText("Step Out ");
        r_stepOut.setFocusable(false);
        r_stepOut.setBorderPainted(false);
        r_stepOut.setEnabled(false);
        r_stepOut.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (ScanFile.call_count > 0) {
                                    FrontEnd.appendToPane(FrontEnd.statuswindow,"Debugging Mode Step Out Activated\n",Color.BLACK);

                    h.stepout();
                }
            }
        });
        toolbar.add(r_stepOut);

        r_stepover = new JButton();
        r_stepover.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/stepover.png"))); // NOI18N
        r_stepover.setToolTipText("Step Over");
        r_stepover.setFocusable(false);
      
        r_stepover.setBorderPainted(false);
        r_stepover.setEnabled(false);
        r_stepover.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                FrontEnd.appendToPane(FrontEnd.statuswindow,"Debugging Mode Step Over Activated\n",Color.BLACK);
                h.stepover();
            }
        });
        toolbar.add(r_stepover);



        JLabel junk = new JLabel("                ");
        toolbar.add(junk);
        steprun = new JButton();
        steprun.setText("Next ");
       // steprun.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F10,0));

        steprun.setVisible(false);
       // Keystroke k= new Keystroke();
      //  steprun.getActionForKeyStroke(java.awt.event.InputEvent.CTRL_MASK);
        steprun.getActionForKeyStroke(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F3,java.awt.event.InputEvent.CTRL_MASK));//getInputMap().get());
        steprun.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    //FrontEnd.appendToPane(FrontEnd.statuswindow," \n",Color.BLACK);
                    h.steprunActionPerformed(evt);
                } catch (IOException ex) {
                }
            }
        });
        toolbar.add(steprun);


        warning = new JLabel();
        warning.setForeground(new java.awt.Color(255, 0, 0));
        warning.setText("**End of File Reached");
        warning.setVisible(false);
        toolbar.add(warning);

        cross = new JButton();
        cross.setText("X");
        cross.setVisible(false);
        cross.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                FrontEnd.appendToPane(FrontEnd.statuswindow,"Debugging Completed \n",Color.BLACK);
                steprun.setEnabled(true);
                steprun.setVisible(false);
                stop_debug_mode.setEnabled(true);
                stop_debug_mode.setVisible(false);
                Register.resetRegisters();
                h.update(handlers.regMode);

                StepRun.callbbeq = false;
                warning.setVisible(false);
                cross.setVisible(false);
            }
        });


        toolbar.add(cross);
        JLabel junk2 = new JLabel("                ");
        toolbar.add(junk2);
        stop_debug_mode = new JButton();
        stop_debug_mode.setText("Stop Debugging");
        stop_debug_mode.setVisible(false);
        
        stop_debug_mode.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {

                    h.stopdebugmode(evt);
                    FrontEnd.appendToPane(FrontEnd.statuswindow,"Debugging Stopped \n",Color.BLACK);
                } catch (IOException ex) {
                }
            }
        });
        toolbar.add(stop_debug_mode);
        onconsole=new JToggleButton();
       onconsole.setFocusable(false);
      onconsole.setBorderPainted(false);
               onconsole.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/Terminal.png"))); // NOI18N

        onconsole.setToolTipText("Prints Current Instruction On Console");
       onconsole.doClick();
//        onconsole.addItemListener(new ItemListener() {
//            @Override
//        public void itemStateChanged(ItemEvent ev) {
//        if(ev.getStateChange()==ItemEvent.SELECTED){
//        System.out.println("button is selected");
//      } else if(ev.getStateChange()==ItemEvent.DESELECTED){
//        System.out.println("button is not selected");
//      }
//   }
//});
        JLabel junk3 = new JLabel("                ");
        toolbar.add(junk3);
        toolbar.add(onconsole);
         JLabel junk4 = new JLabel("                ");
        toolbar.add(junk4);
        clr = new JButton();
                        clr.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/clear.png"))); // NOI18N

        clr.setFocusable(true);
        clr.setBorderPainted(false);
       // clr.setBorder(null);
       // clr.setText("Clean");
        clr.setToolTipText("Clear the status window");
        
        
        clr.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
               // try {
                FrontEnd.statuswindow.setText("");
     
            }
        });
         clr2 = new JButton();
        //clr2.setText("Clear");
                clr2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/clr.jpg"))); // NOI18N

        clr2.setFocusable(false);
        clr2.setBorderPainted(false);
        clr2.setToolTipText("Remove All Highlights");
        
        
        clr2.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
               // try {
                FrontEnd.activepane.getHighlighter().removeAllHighlights();
     
            }
        });
        toolbar.add(clr);
         JLabel junk5 = new JLabel("                ");
         toolbar.add(junk5);
        toolbar.add(clr2);
        this.add(toolbar, BorderLayout.PAGE_START);

    }