Sistema em java

Disponível somente no TrabalhosFeitos
  • Páginas : 6 (1496 palavras )
  • Download(s) : 0
  • Publicado : 23 de maio de 2012
Ler documento completo
Amostra do texto
package TIO;

import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class TelaFuncionario extends JFrame implements ActionListener
{
JLabel l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17; //Refere-se aos campos do formulário
JTextField t1,t2,t3,t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17; //Refere-se ao texto dentrodos campos
JButton b1, b2, b3, b4, b5, b6, b7, b8, b9, b10; //Refere-se aos botões: adicionar, gravar, anterior, proximo, desfazer etc.

TelaFuncionario()
{
l1 = new JLabel("CPF");
l2 = new JLabel("Nome Completo");
l3 = new JLabel("RG");
l4 = new JLabel("Endereço");
l5 = new JLabel("Nº");
l6 = new JLabel("Complemento");
l7 = new JLabel("Bairro");
l8 = newJLabel("Cidade");
l9 = new JLabel("UF");
l10 = new JLabel("CEP");
l11 = new JLabel("E-mail");
l12 = new JLabel("Sexo");
l13 = new JLabel("Celular");
l14 = new JLabel("Residencial");
l15 = new JLabel("Comercial");
l16 = new JLabel("Login");
l17 = new JLabel("Senha");


t1 = new JTextField();
t2 = new JTextField();
t3 = new JTextField();
t4 = new JTextField();
t5 =new JTextField();
t6 = new JTextField();
t7 = new JTextField();
t8 = new JTextField();
t9 = new JTextField();
t10 = new JTextField();
t11 = new JTextField();
t12 = new JTextField();
t13 = new JTextField();
t14 = new JTextField();
t15 = new JTextField();
t16 = new JTextField();
t17 = new JTextField();


b1 = new JButton("Incluir");
b2 = newJButton("Deletar");
b3 = new JButton("Alterar");
b4 = new JButton("Busca");
b5 = new JButton("Limpar");
b6 = new JButton("");
b10 = new JButton("Sair");

setTitle("Cadastro Funcionário"); //Titulo do Formulário
setSize(800,600); //Tamanho da tela: LARGURA x ALTURA

//CPF
l1.setBounds(50, 50, 100, 20);
t1.setBounds(50, 70, 200, 20);

//NOME COMPLETOl2.setBounds(50, 100, 150, 20);
t2.setBounds(50, 120, 300, 20);

//RG
l3.setBounds(300, 50, 100, 20);
t3.setBounds(300, 70, 190, 20);

//ENDEREÇO
l4.setBounds(50, 150, 100, 20);
t4.setBounds(50, 170, 300, 20);

//NÚMERO
l5.setBounds(410, 150, 100, 20);
t5.setBounds(410, 170, 70, 20);

//COMPLEMENTO
l6.setBounds(510, 150, 100, 20);
t6.setBounds(510, 170, 90, 20);//BAIRRO
l7.setBounds(50, 200, 100, 20);
t7.setBounds(50, 220, 200, 20);

//CIDADE
l8.setBounds(320, 200, 100, 20);
t8.setBounds(320, 220, 200, 20);

//UF(ESTADO)
l9.setBounds(570, 200, 100, 20);
t9.setBounds(570, 220, 30, 20);

//CEP
l10.setBounds(50, 250, 100, 20);
t10.setBounds(50, 270, 100, 20);

//E-MAIL
l11.setBounds(410, 100, 100,20);
t11.setBounds(410, 120, 190, 20);

//SEXO
l12.setBounds(520, 50, 100, 20);
t12.setBounds(520, 70, 80, 20);

//TELEFONE CELULAR
l13.setBounds(50, 300, 100, 20);
t13.setBounds(50, 320, 100, 20);

//TELEFONE RESIDENCIAL
l14.setBounds(200, 300, 100, 20);
t14.setBounds(200, 320, 100, 20);

//TELEFONE COMERCIAL
l15.setBounds(350, 300, 100, 20);t15.setBounds(350, 320, 100, 20);

//LOGIN
l16.setBounds(50, 350, 100, 20);
t16.setBounds(50, 370, 100, 20);

//SENHA
l17.setBounds(200, 350, 100, 20);
t17.setBounds(200, 370, 100, 20);



b1.setBounds(130,420,80,30);
b2.setBounds(210,420,80,30);
b3.setBounds(290,420,80,30);
b4.setBounds(370,420,80,30);
b5.setBounds(450,420,80,30);b6.setBounds(130,470,80,30);
b7.setBounds(210,470,80,30);
b8.setBounds(290,470,80,30);
b9.setBounds(370,470,80,30);
b10.setBounds(450,470,80,30);

b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
b6.addActionListener(this);
b7.addActionListener(this);
b8.addActionListener(this);...
tracking img