/*
 * MenuPrincipal.java
 *
 * Created on 21 de Outubro de 2006, 11:44
 */

package javaabstrato;

/**
 *
 * @author  awolf
 */
public class MenuPrincipal extends javax.swing.JFrame {
    
    /** Creates new form MenuPrincipal */
    public MenuPrincipal() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        mbPrincipal = new javax.swing.JMenuBar();
        mnCadastro = new javax.swing.JMenu();
        miClientes = new javax.swing.JMenuItem();
        miForncededor = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        miUtil = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistema Abstrato");
        mnCadastro.setMnemonic('C');
        mnCadastro.setText("Cadastro");
        mnCadastro.setToolTipText("Clique aqui para Cadastros");
        mnCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnCadastroActionPerformed(evt);
            }
        });

        miClientes.setMnemonic('c');
        miClientes.setText("Clientes");
        miClientes.setToolTipText("Cadastro de Clientes");
        miClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miClientesActionPerformed(evt);
            }
        });

        mnCadastro.add(miClientes);

        miForncededor.setText("Fornecedor");
        miForncededor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miForncededorActionPerformed(evt);
            }
        });

        mnCadastro.add(miForncededor);

        mbPrincipal.add(mnCadastro);

        jMenu1.setText("Utilitarios");
        miUtil.setMnemonic('u');
        miUtil.setText("Util");
        miUtil.setToolTipText("faz algo");
        miUtil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miUtilActionPerformed(evt);
            }
        });

        jMenu1.add(miUtil);

        mbPrincipal.add(jMenu1);

        setJMenuBar(mbPrincipal);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 286, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 54, Short.MAX_VALUE)
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    private void miForncededorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miForncededorActionPerformed
        Fornecedores forn = new Fornecedores(this);
        forn.setVisible(true);
        
    }//GEN-LAST:event_miForncededorActionPerformed
    
    private void mnCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnCadastroActionPerformed
// TODO add your handling code here:
    }//GEN-LAST:event_mnCadastroActionPerformed
    
    private void miUtilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miUtilActionPerformed
        new Utilitarios().setVisible(true);
    }//GEN-LAST:event_miUtilActionPerformed
    
    private void miClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miClientesActionPerformed
        Clientes cli = new Clientes(this);
        cli.setVisible(true);
    }//GEN-LAST:event_miClientesActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MenuPrincipal().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar mbPrincipal;
    private javax.swing.JMenuItem miClientes;
    private javax.swing.JMenuItem miForncededor;
    private javax.swing.JMenuItem miUtil;
    private javax.swing.JMenu mnCadastro;
    // End of variables declaration//GEN-END:variables
    
}
