コード例 #1
0
/** @author RAFAELSANTIAGO */
public class ListarFuncionario extends javax.swing.JFrame {

  IFachada fachada = Fachada.obterInstancia();
  DefaultTableModel modelo = new DefaultTableModel();

  /** Creates new form ListarFuncionario */
  public ListarFuncionario() {
    initComponents();
    this.carregarTabelaFucinonarios();
  }

  public void carregarTabelaFucinonarios() {
    modelo = new DefaultTableModel();
    ArrayList<Funcionario> funcionarios = new ArrayList<Funcionario>();
    try {
      funcionarios = (ArrayList<Funcionario>) fachada.consultarTodosFuncionarios();
      modelo.setColumnIdentifiers(
          new Object[] {
            "Id",
            "Nome",
            "CPF",
            "RG",
            "CTPS",
            "Data Nasc.",
            "Telefone",
            "Celular",
            "Salario",
            "CEP",
            "Numero"
          });
      for (Funcionario funcionario : funcionarios) {
        modelo.addRow(
            new String[] {
              Long.toString(funcionario.getId()),
              funcionario.getNome(),
              funcionario.getCpf(),
              funcionario.getRg(),
              funcionario.getCtps(),
              (funcionario.getData_nasc().get(5)
                  + "/"
                  + funcionario.getData_nasc().get(2)
                  + "/"
                  + funcionario.getData_nasc().get(1)),
              funcionario.getTelefone(),
              funcionario.getCelular(),
              Double.toString(funcionario.getSalario()),
              funcionario.getEndereco().getCep(),
              funcionario.getEndereco().getNumero()
            });
      }
      tableFuncionario.setModel(modelo);
    } catch (Exception ex) {
      JOptionPane.showMessageDialog(rootPane, ex.getMessage());
    }
  }

  /**
   * 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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    buttonListarFuncionario = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    canvas1 = new java.awt.Canvas();
    jScrollPane2 = new javax.swing.JScrollPane();
    tableFuncionario = new javax.swing.JTable();
    buttonRemoverFuncionario = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenu3 = new javax.swing.JMenu();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenuItem5 = new javax.swing.JMenuItem();
    jMenu4 = new javax.swing.JMenu();
    jMenuItem6 = new javax.swing.JMenuItem();
    jMenuItem7 = new javax.swing.JMenuItem();
    jMenu14 = new javax.swing.JMenu();
    jMenuItem9 = new javax.swing.JMenuItem();
    jMenuItem24 = new javax.swing.JMenuItem();
    jMenu6 = new javax.swing.JMenu();
    jMenuItem10 = new javax.swing.JMenuItem();
    jMenuItem11 = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JPopupMenu.Separator();
    jMenu7 = new javax.swing.JMenu();
    jMenuItem12 = new javax.swing.JMenuItem();
    jMenuItem13 = new javax.swing.JMenuItem();
    jMenu10 = new javax.swing.JMenu();
    jMenuItem14 = new javax.swing.JMenuItem();
    jMenuItem15 = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JPopupMenu.Separator();
    jMenu8 = new javax.swing.JMenu();
    jMenuItem16 = new javax.swing.JMenuItem();
    jMenuItem17 = new javax.swing.JMenuItem();
    jMenu9 = new javax.swing.JMenu();
    jMenuItem18 = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenuItem2 = new javax.swing.JMenuItem();
    jMenu5 = new javax.swing.JMenu();
    jMenuItem20 = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setResizable(false);

    buttonListarFuncionario.setText("Listar");
    buttonListarFuncionario.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonListarFuncionarioActionPerformed(evt);
          }
        });

    jLabel1.setText("Lista De Funcionarios");

    tableFuncionario.setModel(
        new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] {}));

    tableFuncionario.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    tableFuncionario.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    jScrollPane2.setViewportView(tableFuncionario);

    buttonRemoverFuncionario.setText("Remover");
    buttonRemoverFuncionario.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonRemoverFuncionarioActionPerformed(evt);
          }
        });

    jButton1.setText("Atualizar");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jButton2.setText("Cadastrar");
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });

    jMenu1.setText("Menu");

    jMenu3.setMnemonic('p');
    jMenu3.setText("Prova");

    jMenuItem4.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem4.setText("Cadastro");
    jMenuItem4.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem4ActionPerformed(evt);
          }
        });
    jMenu3.add(jMenuItem4);

    jMenuItem5.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem5.setText("Lista");
    jMenuItem5.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem5ActionPerformed(evt);
          }
        });
    jMenu3.add(jMenuItem5);

    jMenu1.add(jMenu3);

    jMenu4.setMnemonic('C');
    jMenu4.setText("Concurso");

    jMenuItem6.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem6.setText("Cadastro");
    jMenuItem6.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem6ActionPerformed(evt);
          }
        });
    jMenu4.add(jMenuItem6);

    jMenuItem7.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem7.setText("Lista");
    jMenuItem7.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem7ActionPerformed(evt);
          }
        });
    jMenu4.add(jMenuItem7);

    jMenu1.add(jMenu4);

    jMenu14.setMnemonic('Q');
    jMenu14.setText("Questão");

    jMenuItem9.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem9.setText("Cadastro");
    jMenuItem9.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem9ActionPerformed(evt);
          }
        });
    jMenu14.add(jMenuItem9);

    jMenuItem24.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem24.setText("Lista");
    jMenuItem24.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem24ActionPerformed(evt);
          }
        });
    jMenu14.add(jMenuItem24);

    jMenu1.add(jMenu14);

    jMenu6.setMnemonic('G');
    jMenu6.setText("Gênero");

    jMenuItem10.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem10.setText("Cadastro");
    jMenuItem10.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem10ActionPerformed(evt);
          }
        });
    jMenu6.add(jMenuItem10);

    jMenuItem11.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem11.setText("Lista");
    jMenuItem11.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem11ActionPerformed(evt);
          }
        });
    jMenu6.add(jMenuItem11);

    jMenu1.add(jMenu6);
    jMenu1.add(jSeparator3);

    jMenu7.setMnemonic('L');
    jMenu7.setText("Local");

    jMenuItem12.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem12.setText("Cadastro");
    jMenuItem12.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem12ActionPerformed(evt);
          }
        });
    jMenu7.add(jMenuItem12);

    jMenuItem13.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem13.setText("Lista");
    jMenuItem13.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem13ActionPerformed(evt);
          }
        });
    jMenu7.add(jMenuItem13);

    jMenu1.add(jMenu7);

    jMenu10.setMnemonic('E');
    jMenu10.setText("Empresa");

    jMenuItem14.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem14.setText("Cadastro");
    jMenuItem14.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem14ActionPerformed(evt);
          }
        });
    jMenu10.add(jMenuItem14);

    jMenuItem15.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem15.setText("Lista");
    jMenuItem15.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem15ActionPerformed(evt);
          }
        });
    jMenu10.add(jMenuItem15);

    jMenu1.add(jMenu10);
    jMenu1.add(jSeparator2);

    jMenu8.setMnemonic('b');
    jMenu8.setText("Elaborador");

    jMenuItem16.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem16.setText("Cadastro");
    jMenuItem16.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem16ActionPerformed(evt);
          }
        });
    jMenu8.add(jMenuItem16);

    jMenuItem17.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem17.setText("Lista");
    jMenuItem17.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem17ActionPerformed(evt);
          }
        });
    jMenu8.add(jMenuItem17);

    jMenu1.add(jMenu8);

    jMenu9.setMnemonic('F');
    jMenu9.setText("Funcionário");

    jMenuItem18.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem18.setText("Cadastro");
    jMenuItem18.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem18ActionPerformed(evt);
          }
        });
    jMenu9.add(jMenuItem18);

    jMenu1.add(jMenu9);

    jMenuBar1.add(jMenu1);

    jMenu2.setText("Opcoes");

    jMenuItem1.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem1.setText("Home");
    jMenuItem1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
          }
        });
    jMenu2.add(jMenuItem1);

    jMenuItem2.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
    jMenuItem2.setText("Sair");
    jMenuItem2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem2ActionPerformed(evt);
          }
        });
    jMenu2.add(jMenuItem2);

    jMenuBar1.add(jMenu2);

    jMenu5.setText("Ajuda");

    jMenuItem20.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, 0));
    jMenuItem20.setText("Sobre a Empresa");
    jMenuItem20.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem20ActionPerformed(evt);
          }
        });
    jMenu5.add(jMenuItem20);

    jMenuBar1.add(jMenu5);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap(600, Short.MAX_VALUE)
                    .addComponent(
                        canvas1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(186, 186, 186))
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(
                                                        buttonListarFuncionario,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        83,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(36, 36, 36)
                                                    .addComponent(buttonRemoverFuncionario)
                                                    .addGap(30, 30, 30)
                                                    .addComponent(jButton1)
                                                    .addGap(34, 34, 34)
                                                    .addComponent(jButton2)))
                                    .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(25, 25, 25)
                    .addComponent(jLabel1)
                    .addGap(11, 11, 11)
                    .addComponent(
                        jScrollPane2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        166,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(buttonListarFuncionario)
                            .addComponent(buttonRemoverFuncionario)
                            .addComponent(jButton1)
                            .addComponent(jButton2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        canvas1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents

  private void buttonListarFuncionarioActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_buttonListarFuncionarioActionPerformed
    // TODO add your handling code here:
    this.carregarTabelaFucinonarios();
  } // GEN-LAST:event_buttonListarFuncionarioActionPerformed

  private void buttonRemoverFuncionarioActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_buttonRemoverFuncionarioActionPerformed
    // TODO add your handling code here:
    if (tableFuncionario.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(rootPane, "Selecione um funcionario para remover");
    } else {
      Funcionario funcionario = new Funcionario();
      try {
        int codigo = tableFuncionario.getSelectedRow();
        funcionario =
            fachada.consultarFuncionarioPorId(
                Long.parseLong(tableFuncionario.getValueAt(codigo, 0).toString()));
        RemoverFuncionario rmf = new RemoverFuncionario(funcionario, this);
        rmf.setVisible(true);
        this.carregarTabelaFucinonarios();
      } catch (Exception ex) {
        JOptionPane.showMessageDialog(rootPane, ex.getMessage());
      }
    }
  } // GEN-LAST:event_buttonRemoverFuncionarioActionPerformed

  private void jButton1ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton1ActionPerformed
    // TODO add your handling code here:
    if (tableFuncionario.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(rootPane, "Selecione um funcionario para alterar");
    } else {
      Funcionario funcionario = new Funcionario();
      try {
        int codigo = tableFuncionario.getSelectedRow();
        funcionario =
            fachada.consultarFuncionarioPorId(
                Long.parseLong(tableFuncionario.getValueAt(codigo, 0).toString()));
        AlterarFuncionario atf = new AlterarFuncionario(funcionario, this);
        atf.setVisible(true);
        this.carregarTabelaFucinonarios();
      } catch (Exception ex) {
        JOptionPane.showMessageDialog(rootPane, ex.getMessage());
      }
    } // GEN-LAST:event_jButton1ActionPerformed
  }

  private void jButton2ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton2ActionPerformed
    // TODO add your handling code here:
    CRUDFuncionario cf = new CRUDFuncionario(this);
    cf.setVisible(true);
  } // GEN-LAST:event_jButton2ActionPerformed

  private void jMenuItem4ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem4ActionPerformed
    // TODO add your handling code here:
    CRUDProva crudP = new CRUDProva();
    crudP.setVisible(true);
  } // GEN-LAST:event_jMenuItem4ActionPerformed

  private void jMenuItem5ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem5ActionPerformed
    // TODO add your handling code here:
    ListarProva ltsP = new ListarProva();
    ltsP.setVisible(true);
  } // GEN-LAST:event_jMenuItem5ActionPerformed

  private void jMenuItem6ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem6ActionPerformed
    // TODO add your handling code here:
    CRUDConcurso crudC = new CRUDConcurso(null);
    crudC.setVisible(true);
  } // GEN-LAST:event_jMenuItem6ActionPerformed

  private void jMenuItem7ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem7ActionPerformed
    // TODO add your handling code here:
    ListarConcurso lstC = new ListarConcurso();
    lstC.setVisible(true);
  } // GEN-LAST:event_jMenuItem7ActionPerformed

  private void jMenuItem9ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem9ActionPerformed
    // TODO add your handling code here:
    CRUDQuestao crudQ = new CRUDQuestao(null);
    crudQ.setVisible(true);
  } // GEN-LAST:event_jMenuItem9ActionPerformed

  private void jMenuItem24ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem24ActionPerformed
    // TODO add your handling code here:
    ListarQuestao listarq = new ListarQuestao();
    listarq.setVisible(true);
  } // GEN-LAST:event_jMenuItem24ActionPerformed

  private void jMenuItem10ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem10ActionPerformed
    // TODO add your handling code here:
    CRUDGenero crudG = new CRUDGenero(null);
    crudG.setVisible(true);
  } // GEN-LAST:event_jMenuItem10ActionPerformed

  private void jMenuItem11ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem11ActionPerformed
    // TODO add your handling code here:
    ListarGenero lstG = new ListarGenero();
    lstG.setVisible(true);
  } // GEN-LAST:event_jMenuItem11ActionPerformed

  private void jMenuItem12ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem12ActionPerformed
    // TODO add your handling code here:
    CRUDLocal crudL = new CRUDLocal(null);
    crudL.setVisible(true);
  } // GEN-LAST:event_jMenuItem12ActionPerformed

  private void jMenuItem13ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem13ActionPerformed
    // TODO add your handling code here:
    ListarLocal lst = new ListarLocal();
    lst.setVisible(true);
  } // GEN-LAST:event_jMenuItem13ActionPerformed

  private void jMenuItem14ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem14ActionPerformed
    // TODO add your handling code here:
    CRUDEmpresa crudE = new CRUDEmpresa(null);
    crudE.setVisible(true);
  } // GEN-LAST:event_jMenuItem14ActionPerformed

  private void jMenuItem15ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem15ActionPerformed
    // TODO add your handling code here:
    ListarEmpresa lstE = new ListarEmpresa();
    lstE.setVisible(true);
  } // GEN-LAST:event_jMenuItem15ActionPerformed

  private void jMenuItem16ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem16ActionPerformed
    // TODO add your handling code here:
    CRUDElaborador el = new CRUDElaborador(null);
    el.setVisible(true);
  } // GEN-LAST:event_jMenuItem16ActionPerformed

  private void jMenuItem17ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem17ActionPerformed
    // TODO add your handling code here:
    ListarElaborador lstEl = new ListarElaborador();
    lstEl.setVisible(true);
  } // GEN-LAST:event_jMenuItem17ActionPerformed

  private void jMenuItem18ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem18ActionPerformed
    // TODO add your handling code here:
    CRUDFuncionario crudF = new CRUDFuncionario(null);
    crudF.setVisible(true);
  } // GEN-LAST:event_jMenuItem18ActionPerformed

  private void jMenuItem1ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem1ActionPerformed
    // TODO add your handling code here:
    TelaInicial tl = new TelaInicial();
    tl.setVisible(true);
  } // GEN-LAST:event_jMenuItem1ActionPerformed

  private void jMenuItem2ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem2ActionPerformed
    // TODO add your handling code here:
    System.exit(0);
  } // GEN-LAST:event_jMenuItem2ActionPerformed

  private void jMenuItem20ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem20ActionPerformed
    // TODO add your handling code here:
    JOptionPane.showMessageDialog(
        rootPane,
        "'EOC' Empresa Organizadora de Concurso\n dispoe de diversas ferramentas de gerenciamento\n"
            + "Para adequar-se ao uso da ferramenta oferecemos o treinamento necessario\n.Duvidas ligue para fone:Telefone de Antonio ");
  } // GEN-LAST:event_jMenuItem20ActionPerformed

  /** @param args the command line arguments */
  public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(ListarFuncionario.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(ListarFuncionario.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(ListarFuncionario.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(ListarFuncionario.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(
        new Runnable() {
          public void run() {
            new ListarFuncionario().setVisible(true);
          }
        });
  }
  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JButton buttonListarFuncionario;
  private javax.swing.JButton buttonRemoverFuncionario;
  private java.awt.Canvas canvas1;
  private javax.swing.JButton jButton1;
  private javax.swing.JButton jButton2;
  private javax.swing.JLabel jLabel1;
  private javax.swing.JMenu jMenu1;
  private javax.swing.JMenu jMenu10;
  private javax.swing.JMenu jMenu14;
  private javax.swing.JMenu jMenu2;
  private javax.swing.JMenu jMenu3;
  private javax.swing.JMenu jMenu4;
  private javax.swing.JMenu jMenu5;
  private javax.swing.JMenu jMenu6;
  private javax.swing.JMenu jMenu7;
  private javax.swing.JMenu jMenu8;
  private javax.swing.JMenu jMenu9;
  private javax.swing.JMenuBar jMenuBar1;
  private javax.swing.JMenuItem jMenuItem1;
  private javax.swing.JMenuItem jMenuItem10;
  private javax.swing.JMenuItem jMenuItem11;
  private javax.swing.JMenuItem jMenuItem12;
  private javax.swing.JMenuItem jMenuItem13;
  private javax.swing.JMenuItem jMenuItem14;
  private javax.swing.JMenuItem jMenuItem15;
  private javax.swing.JMenuItem jMenuItem16;
  private javax.swing.JMenuItem jMenuItem17;
  private javax.swing.JMenuItem jMenuItem18;
  private javax.swing.JMenuItem jMenuItem2;
  private javax.swing.JMenuItem jMenuItem20;
  private javax.swing.JMenuItem jMenuItem24;
  private javax.swing.JMenuItem jMenuItem4;
  private javax.swing.JMenuItem jMenuItem5;
  private javax.swing.JMenuItem jMenuItem6;
  private javax.swing.JMenuItem jMenuItem7;
  private javax.swing.JMenuItem jMenuItem9;
  private javax.swing.JScrollPane jScrollPane2;
  private javax.swing.JPopupMenu.Separator jSeparator2;
  private javax.swing.JPopupMenu.Separator jSeparator3;
  private javax.swing.JTable tableFuncionario;
  // End of variables declaration//GEN-END:variables
}
コード例 #2
0
/** @author RAFAELSANTIAGO */
public class RemoverLocal extends javax.swing.JFrame {
  IFachada fachada = Fachada.obterInstancia();
  long codigo;
  ListarLocal le;
  /** Creates new form RemoverLocal */
  public RemoverLocal(Local local, ListarLocal le) {
    initComponents();
    this.le = le;
    codigo = local.getId();
    textNomeLocal.setText(local.getNome());
    comboUFLocal.setSelectedItem(local.getEndereco().getUf());
    textCidadeLocal.setText(local.getEndereco().getCidade());
    textBairroLocal.setText(local.getEndereco().getBairro());
    textCEPLocal.setText(local.getEndereco().getCep());
    textLogradouroLocal.setText(local.getEndereco().getLogradouro());
    textNumeroLocal.setText(local.getEndereco().getNumero());
    textComplementoLocal.setText(local.getEndereco().getComplemento());
  }

  private RemoverLocal() {
    throw new UnsupportedOperationException(
        "Not supported yet."); // To change body of generated methods, choose Tools | Templates.
  }

  /**
   * 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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLabel9 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    buttonCancelarLocal = new javax.swing.JButton();
    jLabel13 = new javax.swing.JLabel();
    buttonRemoverLocal = new javax.swing.JButton();
    jLabel11 = new javax.swing.JLabel();
    textCEPLocal = new javax.swing.JFormattedTextField();
    textComplementoLocal = new javax.swing.JTextField();
    textLogradouroLocal = new javax.swing.JTextField();
    textBairroLocal = new javax.swing.JTextField();
    comboUFLocal = new javax.swing.JComboBox();
    jLabel8 = new javax.swing.JLabel();
    textNumeroLocal = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    textCidadeLocal = new javax.swing.JTextField();
    jLabel12 = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    textNomeLocal = new javax.swing.JTextField();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenu3 = new javax.swing.JMenu();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenuItem5 = new javax.swing.JMenuItem();
    jMenu4 = new javax.swing.JMenu();
    jMenuItem6 = new javax.swing.JMenuItem();
    jMenuItem7 = new javax.swing.JMenuItem();
    jMenu14 = new javax.swing.JMenu();
    jMenuItem9 = new javax.swing.JMenuItem();
    jMenuItem24 = new javax.swing.JMenuItem();
    jMenu6 = new javax.swing.JMenu();
    jMenuItem10 = new javax.swing.JMenuItem();
    jMenuItem11 = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JPopupMenu.Separator();
    jMenu7 = new javax.swing.JMenu();
    jMenuItem12 = new javax.swing.JMenuItem();
    jMenuItem13 = new javax.swing.JMenuItem();
    jMenu10 = new javax.swing.JMenu();
    jMenuItem14 = new javax.swing.JMenuItem();
    jMenuItem15 = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JPopupMenu.Separator();
    jMenu8 = new javax.swing.JMenu();
    jMenuItem16 = new javax.swing.JMenuItem();
    jMenuItem17 = new javax.swing.JMenuItem();
    jMenu9 = new javax.swing.JMenu();
    jMenuItem18 = new javax.swing.JMenuItem();
    jMenuItem19 = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenuItem2 = new javax.swing.JMenuItem();
    jMenu5 = new javax.swing.JMenu();
    jMenuItem20 = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setResizable(false);

    jLabel9.setText("Bairro");

    jLabel10.setText("Cep");

    buttonCancelarLocal.setText("Cancelar");
    buttonCancelarLocal.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonCancelarLocalActionPerformed(evt);
          }
        });

    jLabel13.setText("Complemento");

    buttonRemoverLocal.setText("Remover");
    buttonRemoverLocal.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonRemoverLocalActionPerformed(evt);
          }
        });

    jLabel11.setText("Logradouro");

    textCEPLocal.setEditable(false);
    textCEPLocal.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            textCEPLocalActionPerformed(evt);
          }
        });

    textComplementoLocal.setEditable(false);

    textLogradouroLocal.setEditable(false);

    textBairroLocal.setEditable(false);

    comboUFLocal.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {
              "AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MG", "MS", "MT", "PA",
              "PB", "PE", "PI", "PR", "RJ", "RN", "RR", "RS", "RO", "SC", "SE", "SP", "TO", " ", " "
            }));

    jLabel8.setText("Cidade");

    textNumeroLocal.setEditable(false);

    jLabel7.setText("UF");

    textCidadeLocal.setEditable(false);

    jLabel12.setText("Numero");

    jLabel1.setText("Nome");

    textNomeLocal.setEnabled(false);

    jMenu1.setText("Menu");

    jMenu3.setMnemonic('p');
    jMenu3.setText("Prova");

    jMenuItem4.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem4.setText("Cadastro");
    jMenuItem4.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem4ActionPerformed(evt);
          }
        });
    jMenu3.add(jMenuItem4);

    jMenuItem5.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem5.setText("Lista");
    jMenuItem5.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem5ActionPerformed(evt);
          }
        });
    jMenu3.add(jMenuItem5);

    jMenu1.add(jMenu3);

    jMenu4.setMnemonic('C');
    jMenu4.setText("Concurso");

    jMenuItem6.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem6.setText("Cadastro");
    jMenuItem6.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem6ActionPerformed(evt);
          }
        });
    jMenu4.add(jMenuItem6);

    jMenuItem7.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem7.setText("Lista");
    jMenuItem7.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem7ActionPerformed(evt);
          }
        });
    jMenu4.add(jMenuItem7);

    jMenu1.add(jMenu4);

    jMenu14.setMnemonic('Q');
    jMenu14.setText("Questão");

    jMenuItem9.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem9.setText("Cadastro");
    jMenuItem9.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem9ActionPerformed(evt);
          }
        });
    jMenu14.add(jMenuItem9);

    jMenuItem24.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem24.setText("Lista");
    jMenuItem24.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem24ActionPerformed(evt);
          }
        });
    jMenu14.add(jMenuItem24);

    jMenu1.add(jMenu14);

    jMenu6.setMnemonic('G');
    jMenu6.setText("Gênero");

    jMenuItem10.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem10.setText("Cadastro");
    jMenuItem10.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem10ActionPerformed(evt);
          }
        });
    jMenu6.add(jMenuItem10);

    jMenuItem11.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem11.setText("Lista");
    jMenuItem11.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem11ActionPerformed(evt);
          }
        });
    jMenu6.add(jMenuItem11);

    jMenu1.add(jMenu6);
    jMenu1.add(jSeparator3);

    jMenu7.setMnemonic('L');
    jMenu7.setText("Local");

    jMenuItem12.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem12.setText("Cadastro");
    jMenuItem12.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem12ActionPerformed(evt);
          }
        });
    jMenu7.add(jMenuItem12);

    jMenuItem13.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem13.setText("Lista");
    jMenuItem13.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem13ActionPerformed(evt);
          }
        });
    jMenu7.add(jMenuItem13);

    jMenu1.add(jMenu7);

    jMenu10.setMnemonic('E');
    jMenu10.setText("Empresa");

    jMenuItem14.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem14.setText("Cadastro");
    jMenuItem14.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem14ActionPerformed(evt);
          }
        });
    jMenu10.add(jMenuItem14);

    jMenuItem15.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem15.setText("Lista");
    jMenuItem15.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem15ActionPerformed(evt);
          }
        });
    jMenu10.add(jMenuItem15);

    jMenu1.add(jMenu10);
    jMenu1.add(jSeparator2);

    jMenu8.setMnemonic('b');
    jMenu8.setText("Elaborador");

    jMenuItem16.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem16.setText("Cadastro");
    jMenuItem16.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem16ActionPerformed(evt);
          }
        });
    jMenu8.add(jMenuItem16);

    jMenuItem17.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem17.setText("Lista");
    jMenuItem17.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem17ActionPerformed(evt);
          }
        });
    jMenu8.add(jMenuItem17);

    jMenu1.add(jMenu8);

    jMenu9.setMnemonic('F');
    jMenu9.setText("Funcionário");

    jMenuItem18.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem18.setText("Cadastro");
    jMenuItem18.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem18ActionPerformed(evt);
          }
        });
    jMenu9.add(jMenuItem18);

    jMenuItem19.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem19.setText("Lista");
    jMenuItem19.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem19ActionPerformed(evt);
          }
        });
    jMenu9.add(jMenuItem19);

    jMenu1.add(jMenu9);

    jMenuBar1.add(jMenu1);

    jMenu2.setText("Opcoes");

    jMenuItem1.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem1.setText("Home");
    jMenuItem1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
          }
        });
    jMenu2.add(jMenuItem1);

    jMenuItem2.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
    jMenuItem2.setText("Sair");
    jMenuItem2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem2ActionPerformed(evt);
          }
        });
    jMenu2.add(jMenuItem2);

    jMenuBar1.add(jMenu2);

    jMenu5.setText("Ajuda");

    jMenuItem20.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, 0));
    jMenuItem20.setText("Sobre a Empresa");
    jMenuItem20.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem20ActionPerformed(evt);
          }
        });
    jMenu5.add(jMenuItem20);

    jMenuBar1.add(jMenu5);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel10)
                                    .addGap(32, 32, 32)
                                    .addComponent(textCEPLocal)
                                    .addGap(218, 218, 218))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel9)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGroup(
                                                        layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                            .addComponent(jLabel8)
                                                            .addComponent(jLabel7))
                                                    .addGap(18, 18, 18)
                                                    .addGroup(
                                                        layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                            .addComponent(
                                                                comboUFLocal,
                                                                javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE,
                                                                javax.swing.GroupLayout
                                                                    .DEFAULT_SIZE,
                                                                javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE)
                                                            .addGroup(
                                                                layout
                                                                    .createParallelGroup(
                                                                        javax.swing.GroupLayout
                                                                            .Alignment.LEADING,
                                                                        false)
                                                                    .addComponent(textBairroLocal)
                                                                    .addComponent(
                                                                        textCidadeLocal,
                                                                        javax.swing.GroupLayout
                                                                            .PREFERRED_SIZE,
                                                                        128,
                                                                        javax.swing.GroupLayout
                                                                            .PREFERRED_SIZE)))))
                                    .addGap(22, 22, 22)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(jLabel12)
                                                    .addGap(36, 36, 36)
                                                    .addComponent(
                                                        textNumeroLocal,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        78,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(jLabel11)
                                                    .addGap(18, 18, 18)
                                                    .addComponent(
                                                        textLogradouroLocal,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        152,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(jLabel13)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .UNRELATED)
                                                    .addGroup(
                                                        layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                            .addComponent(
                                                                textComplementoLocal,
                                                                javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE,
                                                                171,
                                                                javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE)
                                                            .addGroup(
                                                                layout
                                                                    .createSequentialGroup()
                                                                    .addComponent(
                                                                        buttonCancelarLocal,
                                                                        javax.swing.GroupLayout
                                                                            .PREFERRED_SIZE,
                                                                        81,
                                                                        javax.swing.GroupLayout
                                                                            .PREFERRED_SIZE)
                                                                    .addPreferredGap(
                                                                        javax.swing.LayoutStyle
                                                                            .ComponentPlacement
                                                                            .RELATED)
                                                                    .addComponent(
                                                                        buttonRemoverLocal,
                                                                        javax.swing.GroupLayout
                                                                            .PREFERRED_SIZE,
                                                                        84,
                                                                        javax.swing.GroupLayout
                                                                            .PREFERRED_SIZE)))))
                                    .addContainerGap(
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGap(51, 51, 51)
                                                    .addComponent(
                                                        textNomeLocal,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        221,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(jLabel1))
                                    .addGap(0, 0, Short.MAX_VALUE)))));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(
                                textNomeLocal,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(jLabel11)
                            .addComponent(
                                comboUFLocal,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                textLogradouroLocal,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8)
                            .addComponent(jLabel12)
                            .addComponent(
                                textCidadeLocal,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                textNumeroLocal,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel9)
                                            .addComponent(
                                                textBairroLocal,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(18, 18, 18)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel13)
                                            .addComponent(
                                                textComplementoLocal,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(
                                textCEPLocal,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(buttonRemoverLocal)
                            .addComponent(buttonCancelarLocal))
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents

  private void buttonRemoverLocalActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_buttonRemoverLocalActionPerformed
    try {
      // TODO add your handling code here:
      fachada.removerLocal(codigo);
      JOptionPane.showMessageDialog(rootPane, "Local Removido com sucesso");
      le.carregarTabelaLocal();
      this.dispose();
    } catch (Exception ex) {
      JOptionPane.showMessageDialog(rootPane, ex.getMessage());
    }
  } // GEN-LAST:event_buttonRemoverLocalActionPerformed

  private void textCEPLocalActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_textCEPLocalActionPerformed
    // TODO add your handling code here:
  } // GEN-LAST:event_textCEPLocalActionPerformed

  private void buttonCancelarLocalActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_buttonCancelarLocalActionPerformed
    // TODO add your handling code here:
    this.dispose();
  } // GEN-LAST:event_buttonCancelarLocalActionPerformed

  private void jMenuItem4ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem4ActionPerformed
    // TODO add your handling code here:
    CRUDProva crudP = new CRUDProva();
    crudP.setVisible(true);
  } // GEN-LAST:event_jMenuItem4ActionPerformed

  private void jMenuItem5ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem5ActionPerformed
    // TODO add your handling code here:
    ListarProva ltsP = new ListarProva();
    ltsP.setVisible(true);
  } // GEN-LAST:event_jMenuItem5ActionPerformed

  private void jMenuItem6ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem6ActionPerformed
    // TODO add your handling code here:
    CRUDConcurso crudC = new CRUDConcurso(null);
    crudC.setVisible(true);
  } // GEN-LAST:event_jMenuItem6ActionPerformed

  private void jMenuItem7ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem7ActionPerformed
    // TODO add your handling code here:
    ListarConcurso lstC = new ListarConcurso();
    lstC.setVisible(true);
  } // GEN-LAST:event_jMenuItem7ActionPerformed

  private void jMenuItem9ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem9ActionPerformed
    // TODO add your handling code here:
    CRUDQuestao crudQ = new CRUDQuestao(null);
    crudQ.setVisible(true);
  } // GEN-LAST:event_jMenuItem9ActionPerformed

  private void jMenuItem24ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem24ActionPerformed
    // TODO add your handling code here:
    ListarQuestao listarq = new ListarQuestao();
    listarq.setVisible(true);
  } // GEN-LAST:event_jMenuItem24ActionPerformed

  private void jMenuItem10ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem10ActionPerformed
    // TODO add your handling code here:
    CRUDGenero crudG = new CRUDGenero(null);
    crudG.setVisible(true);
  } // GEN-LAST:event_jMenuItem10ActionPerformed

  private void jMenuItem11ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem11ActionPerformed
    // TODO add your handling code here:
    ListarGenero lstG = new ListarGenero();
    lstG.setVisible(true);
  } // GEN-LAST:event_jMenuItem11ActionPerformed

  private void jMenuItem12ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem12ActionPerformed
    // TODO add your handling code here:
    CRUDLocal crudL = new CRUDLocal(null);
    crudL.setVisible(true);
  } // GEN-LAST:event_jMenuItem12ActionPerformed

  private void jMenuItem13ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem13ActionPerformed
    // TODO add your handling code here:
    ListarLocal lst = new ListarLocal();
    lst.setVisible(true);
  } // GEN-LAST:event_jMenuItem13ActionPerformed

  private void jMenuItem14ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem14ActionPerformed
    // TODO add your handling code here:
    CRUDEmpresa crudE = new CRUDEmpresa(null);
    crudE.setVisible(true);
  } // GEN-LAST:event_jMenuItem14ActionPerformed

  private void jMenuItem15ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem15ActionPerformed
    // TODO add your handling code here:
    ListarEmpresa lstE = new ListarEmpresa();
    lstE.setVisible(true);
  } // GEN-LAST:event_jMenuItem15ActionPerformed

  private void jMenuItem16ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem16ActionPerformed
    // TODO add your handling code here:
    CRUDElaborador el = new CRUDElaborador(null);
    el.setVisible(true);
  } // GEN-LAST:event_jMenuItem16ActionPerformed

  private void jMenuItem17ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem17ActionPerformed
    // TODO add your handling code here:
    ListarElaborador lstEl = new ListarElaborador();
    lstEl.setVisible(true);
  } // GEN-LAST:event_jMenuItem17ActionPerformed

  private void jMenuItem18ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem18ActionPerformed
    // TODO add your handling code here:
    CRUDFuncionario crudF = new CRUDFuncionario(null);
    crudF.setVisible(true);
  } // GEN-LAST:event_jMenuItem18ActionPerformed

  private void jMenuItem19ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem19ActionPerformed
    // TODO add your handling code here:
    ListarFuncionario lstF = new ListarFuncionario();
    lstF.setVisible(true);
  } // GEN-LAST:event_jMenuItem19ActionPerformed

  private void jMenuItem1ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem1ActionPerformed
    // TODO add your handling code here:
    TelaInicial tl = new TelaInicial();
    tl.setVisible(true);
  } // GEN-LAST:event_jMenuItem1ActionPerformed

  private void jMenuItem2ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem2ActionPerformed
    // TODO add your handling code here:
    System.exit(0);
  } // GEN-LAST:event_jMenuItem2ActionPerformed

  private void jMenuItem20ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jMenuItem20ActionPerformed
    // TODO add your handling code here:
    JOptionPane.showMessageDialog(
        rootPane,
        "'EOC' Empresa Organizadora de Concurso\n dispoe de diversas ferramentas de gerenciamento\n"
            + "Para adequar-se ao uso da ferramenta oferecemos o treinamento necessario\n.Duvidas ligue para fone:Telefone de Antonio ");
  } // GEN-LAST:event_jMenuItem20ActionPerformed

  /** @param args the command line arguments */
  public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(RemoverLocal.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(RemoverLocal.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(RemoverLocal.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(RemoverLocal.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(
        new Runnable() {
          public void run() {
            new RemoverLocal().setVisible(true);
          }
        });
  }
  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JButton buttonCancelarLocal;
  private javax.swing.JButton buttonRemoverLocal;
  private javax.swing.JComboBox comboUFLocal;
  private javax.swing.JLabel jLabel1;
  private javax.swing.JLabel jLabel10;
  private javax.swing.JLabel jLabel11;
  private javax.swing.JLabel jLabel12;
  private javax.swing.JLabel jLabel13;
  private javax.swing.JLabel jLabel7;
  private javax.swing.JLabel jLabel8;
  private javax.swing.JLabel jLabel9;
  private javax.swing.JMenu jMenu1;
  private javax.swing.JMenu jMenu10;
  private javax.swing.JMenu jMenu14;
  private javax.swing.JMenu jMenu2;
  private javax.swing.JMenu jMenu3;
  private javax.swing.JMenu jMenu4;
  private javax.swing.JMenu jMenu5;
  private javax.swing.JMenu jMenu6;
  private javax.swing.JMenu jMenu7;
  private javax.swing.JMenu jMenu8;
  private javax.swing.JMenu jMenu9;
  private javax.swing.JMenuBar jMenuBar1;
  private javax.swing.JMenuItem jMenuItem1;
  private javax.swing.JMenuItem jMenuItem10;
  private javax.swing.JMenuItem jMenuItem11;
  private javax.swing.JMenuItem jMenuItem12;
  private javax.swing.JMenuItem jMenuItem13;
  private javax.swing.JMenuItem jMenuItem14;
  private javax.swing.JMenuItem jMenuItem15;
  private javax.swing.JMenuItem jMenuItem16;
  private javax.swing.JMenuItem jMenuItem17;
  private javax.swing.JMenuItem jMenuItem18;
  private javax.swing.JMenuItem jMenuItem19;
  private javax.swing.JMenuItem jMenuItem2;
  private javax.swing.JMenuItem jMenuItem20;
  private javax.swing.JMenuItem jMenuItem24;
  private javax.swing.JMenuItem jMenuItem4;
  private javax.swing.JMenuItem jMenuItem5;
  private javax.swing.JMenuItem jMenuItem6;
  private javax.swing.JMenuItem jMenuItem7;
  private javax.swing.JMenuItem jMenuItem9;
  private javax.swing.JPopupMenu.Separator jSeparator2;
  private javax.swing.JPopupMenu.Separator jSeparator3;
  private javax.swing.JTextField textBairroLocal;
  private javax.swing.JFormattedTextField textCEPLocal;
  private javax.swing.JTextField textCidadeLocal;
  private javax.swing.JTextField textComplementoLocal;
  private javax.swing.JTextField textLogradouroLocal;
  private javax.swing.JTextField textNomeLocal;
  private javax.swing.JTextField textNumeroLocal;
  // End of variables declaration//GEN-END:variables
}