JLabel PacCodigo, PacNome, PacRG, PacCPF, PacTelefone, PacCelular, PacEmail, PacSexo,PacSenha, obs;
JTextField JPacCodigo, JPacNome, JPacRG, JPacCPF, JPacTelefone, JPacCelular, JPacEmail;
JPasswordField PPacSenha;
JComboBox BSexo;
JButton BPacSalvar, BPacNovo, BPacCancelar, BPacExcluir;
ImageIcon canc=new ImageIcon("canc.jpg");
Connection conexao = Conectar.getConnection() ;
String status = Conectar.status ;
public FunCadastro (){
super("Cadastrar Funcionario",new Dimension(500,360));
PacCodigo=new JLabel ("Codigo");
PacCodigo.setBounds(20,20,50,15);
JPacCodigo= new JTextField(""); // Caixa do codigo
JPacCodigo.setBounds(70,15,40,25);
PacNome = new JLabel("Nome");
PacNome.setBounds(120,20,50,15);
JPacNome= new JTextField("");
JPacNome.setBounds(170,15,300,25);
PacCPF= new JLabel("CPF");
PacCPF.setBounds(20,60,50,15);
JPacCPF= new JTextField("");
JPacCPF.setBounds(70,55,170,25);
PacRG= new JLabel("RG");
PacRG.setBounds(265,60,25,15);
JPacRG= new JTextField("");
JPacRG.setBounds(295,55,175,25);
PacTelefone= new JLabel("Telefone");
PacTelefone.setBounds(20,100,50,15);
JPacTelefone= new JTextField("");
JPacTelefone.setBounds(70,95,160,25);
PacCelular= new JLabel("Celular");
PacCelular.setBounds(255,100,45,15);
JPacCelular= new JTextField("");
JPacCelular.setBounds(305,95,165,25);
PacEmail= new JLabel("E-mail");
PacEmail.setBounds(20,145,50,15);
JPacEmail= new JTextField("");
JPacEmail.setBounds(70,140,400,25);
PacSexo= new JLabel("Sexo");
PacSexo.setBounds(20,190,50,15);
String Sexo[]={"Feminino", "Masculino"};
BSexo=new JComboBox(Sexo);
BSexo.setBounds(70,185,100,30);
PacSenha=new JLabel("Senha");
PacSenha.setBounds(200,190,50,15);
PPacSenha=new JPasswordField("");
PPacSenha.setBounds(260,185,210,25);
BPacSalvar= new JButton(new ImageIcon("src/salv.png"));
BPacSalvar.setText("Salvar");
BPacSalvar.setBounds(30,240,200,35);
BPacNovo= new JButton(new ImageIcon("src/limp.png"));
BPacNovo.setText("Limpar");
BPacNovo.setBounds(250,240,200,35);
BPacCancelar= new JButton(new ImageIcon("src/voltar.png"));
BPacCancelar.setText("Voltar");
BPacCancelar.setBounds(30,280,200,35);
BPacExcluir= new JButton(new ImageIcon("src/canc.png"));
BPacExcluir.setText("Excluir");
BPacExcluir.setBounds(250,280,200,35);
getContentPane().add(PacCodigo);
getContentPane().add(JPacCodigo);
getContentPane().add(PacNome);
getContentPane().add(JPacNome);
getContentPane().add(PacCPF);
getContentPane().add(JPacCPF);
getContentPane().add(PacRG);
getContentPane().add(JPacRG);
getContentPane().add(PacTelefone);
getContentPane().add(JPacTelefone);
getContentPane().add(PacCelular);
getContentPane().add(JPacCelular);
getContentPane().add(PacEmail);
getContentPane().add(JPacEmail);
getContentPane().add(PacSexo);
getContentPane().add(BSexo);
getContentPane().add(PacSenha);
getContentPane().add(PPacSenha);
getContentPane().add(BPacSalvar);
getContentPane().add(BPacNovo);
getContentPane().add(BPacCancelar);
getContentPane().add(BPacExcluir);
BPacNovo.addActionListener(this);
BPacCancelar.addActionListener(this);