ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Ejercicios JAVA EXPRESIONES REGULARES


Enviado por   •  2 de Julio de 2014  •  599 Palabras (3 Páginas)  •  800 Visitas

Página 1 de 3

package examen;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

public class examen extends JFrame {

private JTextField titular, ape, curp, col, mun, cp, fadqui, fven, banco,cta,rfc;

JButton boton,boton1,boton2;

public examen() {

super ("RENOVACIÓN DE TARJETA DE CRÉDITO");

// titulos

JLabel Lseccion= new JLabel ("DATOS GENERALES");

JLabel Lseccion2= new JLabel ("DATOS DE LA TARGETA");

//etiquetas principio

JLabel Lnombre= new JLabel ("*Nombre del títular:");

JLabel Lapellidos= new JLabel ("*Apellidos:");

JLabel Lcurp= new JLabel ("*CURP: ");

JLabel Lcolonia= new JLabel ("Colonia:");

JLabel Lmunicipio= new JLabel ("Municipio:");

JLabel Lcp= new JLabel ("*Código Postal:");

JLabel Lfechaa= new JLabel ("Fecha de Adquisición:");

JLabel Lfechav= new JLabel ("Fecha de Vencimiento:");

JLabel Lbanco= new JLabel ("Banco:");

JLabel Lncuenta= new JLabel ("*Número de cuenta:");

JLabel Lrfc= new JLabel ("*RFC:");

//etiquetas final

JLabel Lnombre1= new JLabel ("MAYÚSCULA");

JLabel Lapellidos1= new JLabel ("MAYÚSCULA (DOS APELLIDOS ABLIGATORIOS)");

JLabel Lcurp1= new JLabel ("MAYÚSCULA");

JLabel Lcolonia1= new JLabel ("MAYÚSCULA");

JLabel Lmunicipio1= new JLabel ("MAYÚSCULA");

JLabel Lcp1= new JLabel ("5 Digitos");

L

JLabel Lfechaa1= new JLabel ("FORMATO FECHA DD/MM/AA");

JLabel Lfechav1= new JLabel ("FORMATO FECHA DD/MM/AA");

JLabel Lbanco1= new JLabel ("MAYÚSCULA");

JLabel Lncuenta1= new JLabel ("16 DIGITOS, SEPARADOS POR GUIONES CADA 4 DIGITOS");

JLabel Lrfc1= new JLabel ("MAYÚSCULAS (4 LETRAS-4 NÚMEROS-1 LETRA-1 NÚMERO,)");

// SE crea el boton guardar en este caso se manda a llamar a validar datos

JButton boton=new JButton("Guardar");

boton.addActionListener (

new ActionListener ()

{

public void actionPerformed (ActionEvent evento)

{

validarDatos();

}

}

);

//SE crea el boton y se añade la acción se puede llamar al metodo o hacer directo

JButton boton1=new JButton("Borrar");

boton1.addActionListener (

new ActionListener ()

{

public void actionPerformed (ActionEvent evento)

{

titular.setText("");

ape.setText("");

curp.setText("");

col.setText("");

mun.setText("");

cp.setText("");

fadqui.setText("");

fven.setText("");

banco.setText("");

cta.setText("");

rfc.setText("");

}});

JButton boton2=new JButton("Salir");

boton2.addActionListener (

new ActionListener ()

{

public void actionPerformed (ActionEvent evento)

{

System.exit(0);

}});

titular = new JTextField (20);

ape = new JTextField (20);

curp = new JTextField (29);

col = new JTextField (20);

mun = new JTextField (20);

cp= new JTextField (20);

fadqui = new JTextField (20);

fven = new JTextField (20);

banco = new JTextField (20);

cta= new JTextField (20);

rfc = new JTextField (20);

JPanel secp = new JPanel();

secp.add(Lseccion);

secp.setBackground(Color.LIGHT_GRAY);

JPanel nombrep = new JPanel();

nombrep.add(Lnombre);

...

Descargar como (para miembros actualizados)  txt (7.5 Kb)  
Leer 2 páginas más »
Disponible sólo en Clubensayos.com