private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        try {
            long id = Long.parseLong(jTextField1.getText());
            long tel = Long.parseLong(jTextField5.getText());
            String nome = jTextField2.getText();
            String end = jTextField3.getText();
            String email = jTextField4.getText();
            if (f.buscarCliente(id) instanceof ClienteFisico) {
                f.alterarCliente(new ClienteFisico(id, nome, end, email, tel));
            } else {
                f.alterarCliente(new ClienteJuridico(id, nome, end, email, tel));
            }
            JOptionPane.showMessageDialog(null, "Alterado com sucesso!");
            dispose();
        } catch (Exception e) {
            
        }
    }//GEN-LAST:event_jButton2ActionPerformed