Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Alexandre S. S. Correia

Banco de Dados não grava dados, porque?

Recommended Posts

Olá a tdos...Criei um cadastro no netbeans 6.0 para registro de dados no MYSQL workbench para o meu TCC. Curso Sistemas de Informação e preciso concluir o código este ano...O meu código consegue conexão com o BD, mas não está gravando os dados no banco, acusando erro ao gravar dados...Por favor me ajudem onde posso estar errando e me mandem o que falta, obrigado...segue o código:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Cadastro.java
*
* Created on 16/03/2013, 17:16:50
*/
package Gui;
/**
*
* @author Alexandre
*/
//import com.sun.org.apache.bcel.internal.generic.RETURN;
//import java.sql.Connection;
//import java.sql.DriverManager;
//import java.sql.Statement;
//import java.sql.ResultSet;
//import java.sql.*;
import java.sql.SQLException;
import javax.swing.JOptionPane;
import conect.conexao;
//import java.util.*;
public class Cadastro extends javax.swing.JFrame {
//Connection con ;
conexao con_bd_canil;
int navega = 0; //controlar erro de navegação nos botões próximo e anterior.
/** Creates new form Cadastro */
public Cadastro() {
initComponents();
//estas 3 linhas de código abaixo representam a conexão com o banco de dados.
con_bd_canil = new conexao();
con_bd_canil.conecta();
con_bd_canil.executeSQL("select * from cadastro");
try
{
con_bd_canil.resultset.first();
tf_NumeroChip.setText(con_bd_canil.resultset.getString("NumeroChip"));
formatdate_DataCadastro.setText(con_bd_canil.resultset.getString("DataCadastro"));
tf_NomeAnimal.setText(con_bd_canil.resultset.getString("NomeAnimal"));
tf_DataNascimento.setText(con_bd_canil.resultset.getString("DataNascimento"));
rdbtn_Canino.setText(con_bd_canil.resultset.getString("Canino"));
rdbtn_Felino.setText(con_bd_canil.resultset.getString("Felino"));
tf_Raça.setText("Raça");
tf_Cor.setText("Cor");
rdbtn_Masculino.setText("Masculino");
rdbtn_Feminino.setText("Feminino");
rdbtn_Pequeno.setText("Pequeno");
rdbtn_Médio.setText("Médio");
rdbtn_Grande.setText("Grande");
lb_FotoCarregada.setText("Fotografia");//a verificar qual o tipo da sua variável no mysql
rdbtn_sim_OutrosAnimais.setText("sim_OutrosAnimais");
rdbtn_nao_OutrosAnimais.setText("nao_OutrosAnimais");
tf_QtosAnimais.setText("QtosAnimais");
tf_OutrasEspecies.setText("OutrasEspecies");
ckbx_Calcivirose.setText("Calcivirose");
ckbx_Calicivirose.setText("Calicivirose");
ckbx_Cinomose.setText("Cinomose");
ckbx_Coronavirose.setText("Coronavirose");
ckbx_HepatiteInfecciosa.setText("Hepatite Infecciosa");
ckbx_Leptospirose.setText("Leptospirose");
ckbx_PanleucopeniaFelina.setText("Panleucopenia Felina");
ckbx_Parainfluenza.setText("Parainfluenza");
ckbx_Parvovirose.setText("Parvovirose");
ckbx_Raiva.setText("Raiva");
ckbx_Rinotraqueíte.setText("Rinotraqueíte");
tf_NomeProprietario.setText("NomeProprietario");
tf_NumeroRg.setText("NumeroRg");
tf_NumeroCpf.setText("NumeroCpf");
tf_Endereço.setText("Endereço");
tf_ComplementoEnd.setText("ComplementoEnd");
tf_Bairro.setText("Bairro");
tf_FoneResidencia.setText("FoneResidencia");
tf_FoneComercio.setText("FoneComercio");
tf_Celular.setText("Celular");
tf_Email.setText("tf_Email");
txtArea_Prontuario.setText("Prontuario");
tf_VetResponsavel.setText("VetResponsavel");
tf_Crmv.setText("Crmv");
}
catch(SQLException erro)
{
JOptionPane.showMessageDialog(null,"Não Localizou Dados:\n"+erro);
}
}
/** 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">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
formatdate_DataCadastro = new javax.swing.JFormattedTextField();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
tf_NumeroChip = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
tf_NomeAnimal = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
tf_DataNascimento = new javax.swing.JTextField();
btn_ConsultaChip = new javax.swing.JButton();
jLabel11 = new javax.swing.JLabel();
rdbtn_Canino = new javax.swing.JRadioButton();
rdbtn_Felino = new javax.swing.JRadioButton();
jLabel12 = new javax.swing.JLabel();
tf_Raça = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
tf_Cor = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
rdbtn_Masculino = new javax.swing.JRadioButton();
rdbtn_Feminino = new javax.swing.JRadioButton();
jLabel15 = new javax.swing.JLabel();
rdbtn_Pequeno = new javax.swing.JRadioButton();
rdbtn_Médio = new javax.swing.JRadioButton();
rdbtn_Grande = new javax.swing.JRadioButton();
jLabel16 = new javax.swing.JLabel();
btn_CarregaFoto = new javax.swing.JButton();
lb_FotoCarregada = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
rdbtn_sim_OutrosAnimais = new javax.swing.JRadioButton();
rdbtn_nao_OutrosAnimais = new javax.swing.JRadioButton();
jLabel17 = new javax.swing.JLabel();
tf_QtosAnimais = new javax.swing.JTextField();
jLabel18 = new javax.swing.JLabel();
tf_OutrasEspecies = new javax.swing.JTextField();
jLabel19 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
tf_NomeProprietario = new javax.swing.JTextField();
jLabel21 = new javax.swing.JLabel();
tf_NumeroRg = new javax.swing.JTextField();
jLabel22 = new javax.swing.JLabel();
tf_NumeroCpf = new javax.swing.JTextField();
jLabel23 = new javax.swing.JLabel();
tf_Endereço = new javax.swing.JTextField();
jLabel24 = new javax.swing.JLabel();
tf_NumeroCasa = new javax.swing.JTextField();
jLabel25 = new javax.swing.JLabel();
tf_ComplementoEnd = new javax.swing.JTextField();
jLabel26 = new javax.swing.JLabel();
tf_Bairro = new javax.swing.JTextField();
jLabel27 = new javax.swing.JLabel();
tf_FoneResidencia = new javax.swing.JTextField();
jLabel28 = new javax.swing.JLabel();
tf_FoneComercio = new javax.swing.JTextField();
jLabel29 = new javax.swing.JLabel();
tf_Celular = new javax.swing.JTextField();
jLabel30 = new javax.swing.JLabel();
tf_Email = new javax.swing.JTextField();
jLabel31 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
txtArea_Prontuario = new javax.swing.JTextArea();
jLabel32 = new javax.swing.JLabel();
tf_VetResponsavel = new javax.swing.JTextField();
jLabel33 = new javax.swing.JLabel();
tf_Crmv = new javax.swing.JTextField();
btn_Primeiro = new javax.swing.JButton();
btn_Anterior = new javax.swing.JButton();
btn_Proximo = new javax.swing.JButton();
btn_Ultimo = new javax.swing.JButton();
btn_Deletar = new javax.swing.JButton();
btn_Imprimir = new javax.swing.JButton();
btn_Salvar = new javax.swing.JButton();
ckbx_Calcivirose = new javax.swing.JCheckBox();
ckbx_Calicivirose = new javax.swing.JCheckBox();
ckbx_Cinomose = new javax.swing.JCheckBox();
ckbx_Coronavirose = new javax.swing.JCheckBox();
ckbx_HepatiteInfecciosa = new javax.swing.JCheckBox();
ckbx_Leptospirose = new javax.swing.JCheckBox();
ckbx_PanleucopeniaFelina = new javax.swing.JCheckBox();
ckbx_Parainfluenza = new javax.swing.JCheckBox();
ckbx_Parvovirose = new javax.swing.JCheckBox();
ckbx_Raiva = new javax.swing.JCheckBox();
ckbx_Rinotraqueíte = new javax.swing.JCheckBox();
menuPrincipal = new javax.swing.JMenuBar();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("i.Cobweb Systems - Cadastro de Animais");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cadastro", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14), new java.awt.Color(0, 102, 0))); // NOI18N
jLabel1.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\brasão de RGS.jpg")); // NOI18N
jLabel1.setText("jLabel1");
jLabel2.setFont(new java.awt.Font("Times New Roman", 0, 18));
jLabel2.setText("PREFEITURA MUNICIPAL DE RIO GRANDE DA SERRA");
jLabel3.setFont(new java.awt.Font("Times New Roman", 0, 11));
jLabel3.setText("SECRETARIA DE ATENÇÃO À SAÚDE");
jLabel4.setFont(new java.awt.Font("Times New Roman", 0, 11));
jLabel4.setText("VIGILÂNCIA À SAÚDE");
jLabel6.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel6.setText("Data do Registro:");
jLabel7.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\LOGO NO FW_VERDERG_EFETILUM_PLAST2_Pequeno.jpg")); // NOI18N
jLabel7.setText("jLabel7");
jLabel8.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel8.setText("RGA( Nº do Chip ):");
tf_NumeroChip.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tf_NumeroChipActionPerformed(evt);
}
});
jLabel9.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel9.setText("Nome do Animal:");
tf_NomeAnimal.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tf_NomeAnimalActionPerformed(evt);
}
});
jLabel10.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel10.setText("Data de Nascimento:");
btn_ConsultaChip.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_ConsultaChip.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\CERTOpeq.jpg")); // NOI18N
btn_ConsultaChip.setText("Consultar");
jLabel11.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel11.setText("Espécie:");
rdbtn_Canino.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Canino.setText("Canino");
rdbtn_Felino.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Felino.setText("Felino");
jLabel12.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel12.setText("Raça:");
jLabel13.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel13.setText("Cor:");
jLabel14.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel14.setText("Sexo:");
rdbtn_Masculino.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Masculino.setText("Masculino");
rdbtn_Feminino.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Feminino.setText("Feminino");
jLabel15.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel15.setText("Porte:");
rdbtn_Pequeno.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Pequeno.setText("Pequeno");
rdbtn_Médio.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Médio.setText("Médio");
rdbtn_Grande.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_Grande.setText("Grande");
jLabel16.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel16.setText("Vacinado Contra:");
btn_CarregaFoto.setBackground(new java.awt.Color(153, 255, 204));
btn_CarregaFoto.setText("Carregar Foto");
btn_CarregaFoto.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
lb_FotoCarregada.setText("Fotografia");
jLabel5.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel5.setText("Existem outros Animais em Casa:");
rdbtn_sim_OutrosAnimais.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_sim_OutrosAnimais.setText("SIM");
rdbtn_nao_OutrosAnimais.setFont(new java.awt.Font("Times New Roman", 0, 14));
rdbtn_nao_OutrosAnimais.setText("NÃO");
jLabel17.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel17.setText("Quantos:");
jLabel18.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel18.setText("Quais as Espécies:");
jLabel19.setForeground(new java.awt.Color(204, 204, 255));
jLabel19.setText("_______________________________________________________________________________________________________________________________________________________________________________________________________________");
jLabel20.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel20.setText("Nome do Proprietário:");
tf_NomeProprietario.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tf_NomeProprietarioActionPerformed(evt);
}
});
jLabel21.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel21.setText("Nº do RG:");
jLabel22.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel22.setText("Nº do CPF:");
jLabel23.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel23.setText("Endereço/Rua/Av.:");
jLabel24.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel24.setText("Número:");
jLabel25.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel25.setText("Complemento:");
jLabel26.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel26.setText("Bairro:");
jLabel27.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel27.setText("Telefone Residencial:");
jLabel28.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel28.setText("Telefone Comercial:");
jLabel29.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel29.setText("Celular:");
jLabel30.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel30.setText("E-Mail:");
jLabel31.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel31.setText("PRONTUÁRIO:");
txtArea_Prontuario.setColumns(20);
txtArea_Prontuario.setRows(5);
jScrollPane1.setViewportView(txtArea_Prontuario);
jLabel32.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel32.setText("Veterinário Responsável:");
jLabel33.setFont(new java.awt.Font("Times New Roman", 0, 14));
jLabel33.setText("CRMV:");
btn_Primeiro.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_Primeiro.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\Imgbtn1_1.jpg")); // NOI18N
btn_Primeiro.setText("Primeiro");
btn_Primeiro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_PrimeiroActionPerformed(evt);
}
});
btn_Anterior.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_Anterior.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\Imgbtn1.jpg")); // NOI18N
btn_Anterior.setText("Anterior");
btn_Anterior.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_AnteriorActionPerformed(evt);
}
});
btn_Proximo.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_Proximo.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\Imgbtn2.jpg")); // NOI18N
btn_Proximo.setText("Próximo");
btn_Proximo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_ProximoActionPerformed(evt);
}
});
btn_Ultimo.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\Imgbtn2_2.jpg")); // NOI18N
btn_Ultimo.setText("Último");
btn_Ultimo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_UltimoActionPerformed(evt);
}
});
btn_Deletar.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_Deletar.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\DelPeq.jpg")); // NOI18N
btn_Deletar.setText("Deletar");
btn_Imprimir.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_Imprimir.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\ImpressoraBtn.jpg")); // NOI18N
btn_Imprimir.setText("Imprimir");
btn_Salvar.setFont(new java.awt.Font("Times New Roman", 0, 14));
btn_Salvar.setIcon(new javax.swing.ImageIcon("C:\\Users\\Alexandre\\Desktop\\TCC DO CANIL\\IMAGENS PARA O TCC\\SalvarPeq.jpg")); // NOI18N
btn_Salvar.setText("Salvar");
btn_Salvar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_SalvarActionPerformed(evt);
}
});
ckbx_Calcivirose.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Calcivirose.setText("Calcivirose");
ckbx_Calicivirose.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Calicivirose.setText("Calicivirose");
ckbx_Cinomose.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Cinomose.setText("Cinomose");
ckbx_Coronavirose.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Coronavirose.setText("Coronavirose");
ckbx_HepatiteInfecciosa.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_HepatiteInfecciosa.setText("Hepatite Infecciosa");
ckbx_Leptospirose.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Leptospirose.setText("Leptospirose");
ckbx_PanleucopeniaFelina.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_PanleucopeniaFelina.setText("Panleucopenia Felina");
ckbx_Parainfluenza.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Parainfluenza.setText("Parainfluenza");
ckbx_Parvovirose.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Parvovirose.setText("Parvovirose");
ckbx_Raiva.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Raiva.setText("Raiva");
ckbx_Rinotraqueíte.setFont(new java.awt.Font("Times New Roman", 0, 14));
ckbx_Rinotraqueíte.setText("Rinotraqueíte");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_Canino)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_Felino)
.addGap(28, 28, 28)
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Raça, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_NomeAnimal, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(44, 44, 44)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel13)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Cor))
.addComponent(jLabel10))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_DataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(49, 49, 49)
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_Masculino)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_Feminino)
.addGap(55, 55, 55)
.addComponent(jLabel15)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_Pequeno)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(rdbtn_Médio)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_Grande)
.addGap(162, 162, 162))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 311, Short.MAX_VALUE)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_NumeroChip, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_ConsultaChip)))
.addGap(267, 267, 267))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 1215, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(278, 278, 278)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(btn_CarregaFoto))
.addComponent(lb_FotoCarregada, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(27, 27, 27)
.addComponent(jLabel2))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(157, 157, 157)
.addComponent(jLabel3))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(192, 192, 192)
.addComponent(jLabel4)
.addGap(213, 213, 213)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(formatdate_DataCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(47, 47, 47)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel23)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Endereço))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_NomeProprietario, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(44, 44, 44)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel21)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_NumeroRg, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(47, 47, 47)
.addComponent(jLabel22)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_NumeroCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel24)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_NumeroCasa, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(46, 46, 46)
.addComponent(jLabel25)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_ComplementoEnd, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(47, 47, 47)
.addComponent(jLabel26)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Bairro))))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel32)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel27)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_FoneResidencia, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(44, 44, 44)
.addComponent(jLabel28)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_FoneComercio, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(49, 49, 49)
.addComponent(jLabel29))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btn_Deletar)
.addComponent(btn_Primeiro)))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(41, 41, 41)
.addComponent(btn_Anterior))
.addGroup(jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Celular, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addComponent(jLabel30)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Email))
.addGroup(jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_VetResponsavel, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel33)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_Crmv, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(btn_Imprimir)
.addComponent(btn_Proximo))
.addGap(41, 41, 41)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(btn_Salvar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btn_Ultimo, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)))))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 484, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel31))
.addGap(591, 591, 591))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_sim_OutrosAnimais)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rdbtn_nao_OutrosAnimais)
.addGap(45, 45, 45)
.addComponent(jLabel17)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_QtosAnimais, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel18)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tf_OutrasEspecies))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Calcivirose)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Calicivirose)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Cinomose)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Coronavirose)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(ckbx_HepatiteInfecciosa)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(ckbx_Leptospirose)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(ckbx_PanleucopeniaFelina)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Parainfluenza)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Parvovirose)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Raiva)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ckbx_Rinotraqueíte)))))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel4)
.addGap(18, 18, 18)
.addComponent(jLabel7))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(formatdate_DataCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel1)))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(tf_NumeroChip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(lb_FotoCarregada, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(6, 6, 6)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(btn_CarregaFoto)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(tf_NomeAnimal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel10)
.addComponent(tf_DataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(rdbtn_Canino)
.addComponent(rdbtn_Felino)
.addComponent(jLabel12)
.addComponent(jLabel13)
.addComponent(tf_Cor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel14)
.addComponent(rdbtn_Masculino)
.addComponent(rdbtn_Feminino)
.addComponent(jLabel15)
.addComponent(rdbtn_Pequeno)
.addComponent(rdbtn_Médio)
.addComponent(rdbtn_Grande)
.addComponent(tf_Raça, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(btn_ConsultaChip))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel16)
.addComponent(ckbx_Calcivirose)
.addComponent(ckbx_Calicivirose)
.addComponent(ckbx_Cinomose)
.addComponent(ckbx_Coronavirose)
.addComponent(ckbx_HepatiteInfecciosa)
.addComponent(ckbx_Leptospirose)
.addComponent(ckbx_PanleucopeniaFelina)
.addComponent(ckbx_Parainfluenza)
.addComponent(ckbx_Parvovirose)
.addComponent(ckbx_Raiva)
.addComponent(ckbx_Rinotraqueíte))
.addGap(5, 5, 5)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(rdbtn_sim_OutrosAnimais)
.addComponent(rdbtn_nao_OutrosAnimais)
.addComponent(jLabel17)
.addComponent(tf_QtosAnimais, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel18)
.addComponent(tf_OutrasEspecies, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(tf_NomeProprietario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel21)
.addComponent(tf_NumeroRg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel22)
.addComponent(tf_NumeroCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel23)
.addComponent(tf_Endereço, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel24)
.addComponent(tf_NumeroCasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel25)
.addComponent(tf_ComplementoEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel26)
.addComponent(tf_Bairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel27)
.addComponent(tf_FoneResidencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel28)
.addComponent(tf_FoneComercio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel29)
.addComponent(jLabel30)
.addComponent(tf_Email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(tf_Celular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel31)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
.addContainerGap())
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel32)
.addComponent(tf_VetResponsavel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(9, 9, 9)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tf_Crmv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel33))
.addGap(20, 20, 20)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_Anterior)
.addComponent(btn_Primeiro)
.addComponent(btn_Proximo)
.addComponent(btn_Ultimo))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_Deletar)
.addComponent(btn_Imprimir)
.addComponent(btn_Salvar))
.addGap(27, 27, 27))))
);
menuPrincipal.setBackground(new java.awt.Color(153, 255, 204));
setJMenuBar(menuPrincipal);
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(13, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1249, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
pack();
}// </editor-fold>
private void tf_NomeProprietarioActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void tf_NumeroChipActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void tf_NomeAnimalActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void btn_SalvarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
String chip = tf_NumeroChip.getText();
String data_cadastro = formatdate_DataCadastro.getText();
String nomeanimal = tf_NomeAnimal.getText();
String datanasc = tf_DataNascimento.getText();
String canino = rdbtn_Canino.getText();
String felinno = rdbtn_Felino.getText();
String rassa = tf_Raça.getText();
String cor = tf_Cor.getText();
String masculino = rdbtn_Masculino.getText();
String feminino = rdbtn_Feminino.getText();
String pequeno = rdbtn_Pequeno.getText();
String medio = rdbtn_Médio.getText();
String grande = rdbtn_Grande.getText();
String calcivirose = ckbx_Calcivirose.getText();
String calicivirose = ckbx_Calicivirose.getText();
String cinomose = ckbx_Cinomose.getText();
String coronavirose = ckbx_Coronavirose.getText();
String hepatiteinfecciosa = ckbx_HepatiteInfecciosa.getText();
String leptospirose = ckbx_Leptospirose.getText();
String panleucopeniafelina = ckbx_PanleucopeniaFelina.getText();
String parainfluenza = ckbx_Parainfluenza.getText();
String parvovirose = ckbx_Parvovirose.getText();
String raiva = ckbx_Raiva.getText();
String rinotraueite = ckbx_Rinotraqueíte.getText();
String simoutrosanimais = rdbtn_sim_OutrosAnimais.getText();
String naooutrosanimais = rdbtn_nao_OutrosAnimais.getText();
String quantosanimais = tf_QtosAnimais.getText();
String outrasespecies = tf_OutrasEspecies.getText();
String nomeproprietario = tf_NomeProprietario.getText();
String numerorg = tf_NumeroRg.getText();
String numerocpf= tf_NumeroCpf.getText();
String enderesso = tf_Endereço.getText();
String numerocasa = tf_NumeroCasa.getText();
String complementoend = tf_ComplementoEnd.getText();
String bairro = tf_Bairro.getText();
String foneresidencia = tf_FoneResidencia.getText();
String fonecomercio = tf_FoneComercio.getText();
String fonecelular = tf_Celular.getText();
String email = tf_Email.getText();
String textoprontuario = txtArea_Prontuario.getText();
String veterinario = tf_VetResponsavel.getText();
String crmv = tf_Crmv.getText();
//inserção no banco de dados:
String insertSQL = "insert into cadastro (NumeroChip,DataCadastro,NomeAnimal,DataNascimento"+
",Canino,Felino,Raça,Cor,Masculino,Feminino,Pequeno,Médio"+
",Grande,Calcivirose,Calicivirose,Cinomose,Coronavirose,HepatiteInfecciosa,Leptospirose"+
",PanleucopeniaFelina,Parainfluenza,Parvovirose,Raiva,Rinotraqueíte,OutrosAnimais"+
",OutrosAnimais,QtosAnimais,OutrasEspecies,NomeProprietario,NumeroRg,NumeroCpf,Endereço"+
",NumeroCasa,ComplementoEnd,Bairro,FoneResidencia,FoneComercio,Celular,Email,Prontuario"+
",VetResponsavel,Crmv) values ('"+chip+"','"+data_cadastro+"','"+nomeanimal+"','"+datanasc+"','"+
canino+"','"+felinno+"','"+rassa+"','"+cor+"','"+masculino+"','"+feminino+"','"+pequeno+"','"+medio+"','"+grande+"','"+
calcivirose+"','"+calicivirose+"','"+cinomose+"','"+coronavirose+"','"+hepatiteinfecciosa+"','"+ leptospirose+"','"+
panleucopeniafelina+"','"+ parainfluenza+"','"+parvovirose+"','"+raiva+"','"+rinotraueite+"','"+simoutrosanimais+"','"+
naooutrosanimais+"','"+quantosanimais+"','"+outrasespecies+"','"+nomeproprietario+"','"+numerorg+"','"+numerocpf+"','"+
enderesso+"','"+numerocasa+"','"+complementoend+"','"+bairro+"','"+foneresidencia+"','"+ fonecomercio+"','"+fonecelular+"','"+
email+"','"+textoprontuario+"','"+veterinario+"','"+crmv+"')";
con_bd_canil.statement.executeUpdate(insertSQL);
JOptionPane.showMessageDialog(null,"Salvo com Sucesso!");
con_bd_canil.executeSQL("select * from cadastro");
con_bd_canil.resultset.first();
mostrar_Dados();
}
catch(SQLException erro)
{
JOptionPane.showMessageDialog(null,"Erro ao Gravar Dados!");
}
}
private void btn_PrimeiroActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try {
con_bd_canil.resultset.first();
mostrar_Dados();
}
catch(SQLException erro)
{
JOptionPane.showMessageDialog(null,"Não foi possível ir para o Primeiro Registro!"+erro);
}
}
private void btn_AnteriorActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
con_bd_canil.resultset.previous();
mostrar_Dados();
navega = 1;
}
catch(SQLException erro)
{
JOptionPane.showMessageDialog(null,"Não foi possível ir para o Registro Anterior!"+erro);
}
}
private void btn_ProximoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
con_bd_canil.resultset.next();
mostrar_Dados();
navega = 2;
}
catch(SQLException erro)
{
JOptionPane.showMessageDialog(null,"Não foi possível ir para o Próximo Registro! \n"+erro);
}
}
private void btn_UltimoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try{
con_bd_canil.resultset.last();
mostrar_Dados();
}
catch(SQLException erro)
{
JOptionPane.showMessageDialog(null,"Não foi possível ir para o Último Registro! \n"+erro);
}
}
/**
* @param args the command line arguments
*/
public void mostrar_Dados()
{
try
{
tf_NumeroChip.setText(con_bd_canil.resultset.getString("NumeroChip"));
formatdate_DataCadastro.setText(con_bd_canil.resultset.getString("DataCadastro"));
tf_NomeAnimal.setText(con_bd_canil.resultset.getString("NomeAnimal"));
tf_DataNascimento.setText(con_bd_canil.resultset.getString("DataNascimento"));
rdbtn_Canino.setText(con_bd_canil.resultset.getString("Canino"));
rdbtn_Felino.setText(con_bd_canil.resultset.getString("Felino"));
tf_Raça.setText("Raça");
tf_Cor.setText("Cor");
rdbtn_Masculino.setText("Masculino");
rdbtn_Feminino.setText("Feminino");
rdbtn_Pequeno.setText("Pequeno");
rdbtn_Médio.setText("Médio");
rdbtn_Grande.setText("Grande");
lb_FotoCarregada.setText("Fotografia");//a verificar qual o tipo da sua variável no mysql
rdbtn_sim_OutrosAnimais.setText("sim_OutrosAnimais");
rdbtn_nao_OutrosAnimais.setText("nao_OutrosAnimais");
tf_QtosAnimais.setText("QtosAnimais");
tf_OutrasEspecies.setText("OutrasEspecies");
ckbx_Calcivirose.setText("Calcivirose");
ckbx_Calicivirose.setText("Calicivirose");
ckbx_Cinomose.setText("Cinomose");
ckbx_Coronavirose.setText("Coronavirose");
ckbx_HepatiteInfecciosa.setText("Hepatite Infecciosa");
ckbx_Leptospirose.setText("Leptospirose");
ckbx_PanleucopeniaFelina.setText("Panleucopenia Felina");
ckbx_Parainfluenza.setText("Parainfluenza");
ckbx_Parvovirose.setText("Parvovirose");
ckbx_Raiva.setText("Raiva");
ckbx_Rinotraqueíte.setText("Rinotraqueíte");
tf_NomeProprietario.setText("NomeProprietario");
tf_NumeroRg.setText("NumeroRg");
tf_NumeroCpf.setText("NumeroCpf");
tf_Endereço.setText("Endereço");
tf_ComplementoEnd.setText("ComplementoEnd");
tf_Bairro.setText("Bairro");
tf_FoneResidencia.setText("FoneResidencia");
tf_FoneComercio.setText("FoneComercio");
tf_Celular.setText("Celular");
tf_Email.setText("tf_Email");
txtArea_Prontuario.setText("Prontuario");
tf_VetResponsavel.setText("VetResponsavel");
tf_Crmv.setText("Crmv");
} catch(SQLException erro)
{
if (navega==1)
{
JOptionPane.showMessageDialog(null,"Já está no Primeiro Registro!\n");
}
else if (navega==2)
{
JOptionPane.showMessageDialog(null,"Já está no Primeiro Registro!\n");
}
else
JOptionPane.showMessageDialog(null,"Não localizou Dados!\n");
navega=0;
}
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Cadastro().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton btn_Anterior;
private javax.swing.JButton btn_CarregaFoto;
private javax.swing.JButton btn_ConsultaChip;
private javax.swing.JButton btn_Deletar;
private javax.swing.JButton btn_Imprimir;
private javax.swing.JButton btn_Primeiro;
private javax.swing.JButton btn_Proximo;
private javax.swing.JButton btn_Salvar;
private javax.swing.JButton btn_Ultimo;
private javax.swing.JCheckBox ckbx_Calcivirose;
private javax.swing.JCheckBox ckbx_Calicivirose;
private javax.swing.JCheckBox ckbx_Cinomose;
private javax.swing.JCheckBox ckbx_Coronavirose;
private javax.swing.JCheckBox ckbx_HepatiteInfecciosa;
private javax.swing.JCheckBox ckbx_Leptospirose;
private javax.swing.JCheckBox ckbx_PanleucopeniaFelina;
private javax.swing.JCheckBox ckbx_Parainfluenza;
private javax.swing.JCheckBox ckbx_Parvovirose;
private javax.swing.JCheckBox ckbx_Raiva;
private javax.swing.JCheckBox ckbx_Rinotraqueíte;
private javax.swing.JFormattedTextField formatdate_DataCadastro;
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 jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel22;
private javax.swing.JLabel jLabel23;
private javax.swing.JLabel jLabel24;
private javax.swing.JLabel jLabel25;
private javax.swing.JLabel jLabel26;
private javax.swing.JLabel jLabel27;
private javax.swing.JLabel jLabel28;
private javax.swing.JLabel jLabel29;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel30;
private javax.swing.JLabel jLabel31;
private javax.swing.JLabel jLabel32;
private javax.swing.JLabel jLabel33;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel lb_FotoCarregada;
private javax.swing.JMenuBar menuPrincipal;
private javax.swing.JRadioButton rdbtn_Canino;
private javax.swing.JRadioButton rdbtn_Felino;
private javax.swing.JRadioButton rdbtn_Feminino;
private javax.swing.JRadioButton rdbtn_Grande;
private javax.swing.JRadioButton rdbtn_Masculino;
private javax.swing.JRadioButton rdbtn_Médio;
private javax.swing.JRadioButton rdbtn_Pequeno;
private javax.swing.JRadioButton rdbtn_nao_OutrosAnimais;
private javax.swing.JRadioButton rdbtn_sim_OutrosAnimais;
private javax.swing.JTextField tf_Bairro;
private javax.swing.JTextField tf_Celular;
private javax.swing.JTextField tf_ComplementoEnd;
private javax.swing.JTextField tf_Cor;
private javax.swing.JTextField tf_Crmv;
private javax.swing.JTextField tf_DataNascimento;
private javax.swing.JTextField tf_Email;
private javax.swing.JTextField tf_Endereço;
private javax.swing.JTextField tf_FoneComercio;
private javax.swing.JTextField tf_FoneResidencia;
private javax.swing.JTextField tf_NomeAnimal;
private javax.swing.JTextField tf_NomeProprietario;
private javax.swing.JTextField tf_NumeroCasa;
private javax.swing.JTextField tf_NumeroChip;
private javax.swing.JTextField tf_NumeroCpf;
private javax.swing.JTextField tf_NumeroRg;
private javax.swing.JTextField tf_OutrasEspecies;
private javax.swing.JTextField tf_QtosAnimais;
private javax.swing.JTextField tf_Raça;
private javax.swing.JTextField tf_VetResponsavel;
private javax.swing.JTextArea txtArea_Prontuario;
// End of variables declaration
}

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara, usa a tag code <> pra colocar códigos, ou usa o gist, que você pode aproveitar pra fazer um arquivo único e tirar dúvidas em outros lugares.

 

A modelagem do seu banco está de acordo com suas classes? Tem algum erro específico que o console mostra?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.