Acoes nos itens

aeww galera blzinha???

seguinte; eu quero coloca duas ações no meu codigo mais n sei exatamente a onde coloco e como q eu coloco.

o codigo eh esse:

package projetorp;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;

public class projetomidi extends javax.swing.JFrame{

    public projetomidi() {
        initComponents();
    }

    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
        desktopPane = new javax.swing.JDesktopPane();
        menuBar = new javax.swing.JMenuBar();
        arquivo = new javax.swing.JMenu();
        openMenuItem = new javax.swing.JMenuItem();
        saveMenuItem = new javax.swing.JMenuItem();
        saveAsMenuItem = new javax.swing.JMenuItem();
        sair = new javax.swing.JMenuItem();
        cadastrar = new javax.swing.JMenu();
        acicg = new javax.swing.JMenuItem();
        callcenter = new javax.swing.JMenuItem();
        redepura = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().add(desktopPane, java.awt.BorderLayout.CENTER);

        arquivo.setText("Arquivo");
        openMenuItem.setText("Open");
        arquivo.add(openMenuItem);

        saveMenuItem.setText("Save");
        arquivo.add(saveMenuItem);

        saveAsMenuItem.setText("Save As ...");
        arquivo.add(saveAsMenuItem);

        sair.setText("sair");
        sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sairActionPerformed(evt);
            }
        });

        arquivo.add(sair);

        menuBar.add(arquivo);

        cadastrar.setText("Cadastro");
        acicg.setText("Acicg");
        acicg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acicgActionPerformed(evt);
            }
        });

        cadastrar.add(acicg);

        callcenter.setText("Call Center");
        cadastrar.add(callcenter);

        redepura.setText("Rede Pura");
        cadastrar.add(redepura);

        menuBar.add(cadastrar);

        helpMenu.setText("Sair");
        helpMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                helpMenuActionPerformed(evt);
            }
        });

        menuBar.add(helpMenu);

        setJMenuBar(menuBar);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-400)/2, (screenSize.height-300)/2, 400, 300);
    }
    // </editor-fold>

    private void acicgActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
    }

    private void helpMenuActionPerformed(java.awt.event.ActionEvent evt) {                                         
System.exit(0);

    }                                        

    private void sairActionPerformed(java.awt.event.ActionEvent evt) {                                     
        System.exit(0);
    }                                    


    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new projetomidi().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify
    private javax.swing.JMenuItem acicg;
    private javax.swing.JMenu arquivo;
    private javax.swing.JMenu cadastrar;
    private javax.swing.JMenuItem callcenter;
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem openMenuItem;
    private javax.swing.JMenuItem redepura;
    private javax.swing.JMenuItem sair;
    private javax.swing.JMenuItem saveAsMenuItem;
    private javax.swing.JMenuItem saveMenuItem;
    // End of variables declaration

}

no item sair eu quero clicar e sair, e no item acicg quero carregaqr a form acicg…me ajudem plz!!!

=)

[color=red]Mensagem do moderador: Ao postar codigos utilize as tags [ code ] [ /code ].[/color]

O ideal é utilizar JDesktopPane + JInternalFrame:
http://www.javaalmanac.com/egs/javax.swing/desktop_Desktop.html

De uma olhada neste exemplo, deve te ajudar…
Valeu? até… :thumbup:
[]'s