JMenuItem eval = new JMenuItem("Evaluate"); eval.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae_) {
JMenuItem reqSh = new JMenuItem( "Request Shell" ); reqSh.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae_ ) { requestShell(); } } );  JMenuItem eval = new JMenuItem( "Evaluate" ); eval.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae_ ) {
        private void addMenuBar() {            JMenuBar menubar = new JMenuBar();            JMenu jMenuFile = new JMenu("File");            jMenuFile.setMnemonic('F');            JMenuItem exit = new JMenuItem("Exit");            exit.addActionListener(new ActionListener() {                public void actionPerformed(ActionEvent ae_) {                    done();                }            });            JMenuItem eval = new JMenuItem("Evaluate");            eval.addActionListener(new ActionListener() {                public void actionPerformed(ActionEvent ae_) {                    evaluateText();                    repaint();                }            });            menubar.add(jMenuFile);            jMenuFile.add(eval);            jMenuFile.add(exit);            setJMenuBar(menubar);        }