Está en la página 1de 8

UNIVERSIDAD DE AQUINO BOLIVIA “UDABOL “

FACULTAD INGENIERIA SISTEMAS

ARTÍCULO DE REVISIÓN
Programación en java Bluej

AUTOR:
Carlos Condori Flores

SUPERVISOR:
LIC. Elizabeth Delgadillo Camacho

COCHABAMBA, ABRIL 2019

1
INDICE

1. Titulo………………………………………………………. 1
2. Indice………………………………………………………. 2
3. Codigo de login …………………………………………… 3
4. Codigo de Proyecto…………………………………………5
5. Codigo de Mensaje………………………………………….8

2
2
CODIGO LOGIN
import javax.swing.*;
import java.awt.event.*;
public class Login extends JFrame implements ActionListener
{
JLabel n1,n2,n3,n4;
JButton b1,b2;
JTextField t1;
JPasswordField t2;

String clave = "carlos321";


public Login()
{
setLayout(null);
n1 = new JLabel("NUEVA ERA");
n1.setBounds(100,70,100,60);
add(n1);

n2 = new JLabel("Usuario :");


n2.setBounds(50,110,100,60);
add(n2);
t1 = new JTextField();
t1.setBounds(130,130,100,20);
add(t1);

n3 = new JLabel("Contraceña :");


n3.setBounds(50,140,100,60);
add(n3);
t2 = new JPasswordField();
t2.setBounds(130,160,100,20);
add(t2);

b1 = new JButton("Ingresar");
b1.setBounds(40,210,90,20);
add(b1);
b1.addActionListener(this);
b2 = new JButton("Salir");
b2.setBounds(150,210,90,20);
add(b2); 3

3
b2.addActionListener(this);

}
public void actionPerformed(ActionEvent v)
{
String Usuario = "condori";
String Contraceña = "123";
String pass = new String(t2.getText());
if(v.getSource()==b1)
{
if(t1.getText().equals(Usuario) && pass.equals(Contraceña))
{
Cotizacion f = new Cotizacion();
f.setBounds(300,300,330,700);
f.setVisible(true);
f.setTitle("Cotizacion");
}
else
{
Mensaje f2 = new Mensaje();
f2.setBounds(300,300,290,130);
f2.setVisible(true);
f2.setTitle("Mensaje");
}
}
if(v.getSource()==b2)
{
System.exit(0);
}
}

public void mostrar()


{
Login v = new Login();
v.setBounds(300,300,300,300);
v.setVisible(true);
v.setTitle("Login");
}
} 4
4
CODIGO PROYECTO

import javax.swing.*;
public class Cotizacion extends JFrame
{
JLabel n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12;
JTextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
JTextArea a1;

public Cotizacion()
{
setLayout(null);
n1 = new JLabel("DIA");
n1.setBounds(21,20,50,20);
add(n1);
t1 = new JTextField();
t1.setBounds(15,40,35,25);
add(t1);

n2 = new JLabel("MES");
n2.setBounds(61,20,50,20);
add(n2);
t2 = new JTextField();
t2.setBounds(57,40,35,25);
add(t2);

n3 = new JLabel("AÑO");
n3.setBounds(105,20,50,20);
add(n3);
t3 = new JTextField();
t3.setBounds(99,40,35,25);
add(t3);

n4 = new JLabel("COTIZACION");
n4.setBounds(175,35,90,20);
add(n4);

a1 = new JTextArea();
a1.setBounds(20,80,370,380);
add(a1); 5

5
n5 = new JLabel("TOTAL");
n5.setBounds(240,470,50,20);
add(n5);
t4 = new JTextField();
t4.setBounds(285,470,45,20);
add(t4);
t5 = new JTextField();
t5.setBounds(333,470,55,20);
add(t5);

n6 = new JLabel("Sucursal Nro.");


n6.setBounds(70,500,100,20);
add(n6);
t6 = new JTextField();
t6.setBounds(155,500,25,20);
add(t6);

n7 = new JLabel("Vendedor");
n7.setBounds(205,500,90,20);
add(n7);
t7 = new JTextField();
t7.setBounds(265,500,125,20);
add(t7);

n8 = new JLabel("CONTADO");
n8.setBounds(30,530,90,20);
add(n8);
t8 = new JTextField();
t8.setBounds(25,558,65,42);
add(t8);

n9 = new JLabel("CREDITO");
n9.setBounds(240,530,90,20);
add(n9);

n10 = new JLabel("CUOTA INICIAL");


n10.setBounds(100,550,120,20);
add(n10);
t9 = new JTextField(); 6
6
t9.setBounds(93,568,95,32);
add(t9);

n11 = new JLabel("COUTA MENSUAL");


n11.setBounds(200,550,120,20);
add(n11);
t10 = new JTextField();
t10.setBounds(195,568,95,32);
add(t10);

n12 = new JLabel("PLAZO");


n12.setBounds(320,550,90,20);
add(n12);
t11 = new JTextField();
t11.setBounds(295,568,95,32);
add(t11);

public void mostrar()


{
Cotizacion v = new Cotizacion();
v.setBounds(300,300,430,700);
v.setVisible(true);
v.setTitle("Cotizacion");
}
}

7
7
CODIGO MENSAJE

import java.awt.event.*;
import javax.swing.*;
public class Mensaje extends JFrame implements ActionListener
{
JLabel n1;
JButton b1;

public Mensaje()
{
setLayout(null);
n1= new JLabel("Usuario / Contraceña incorrecta");
n1.setBounds(60,25,190,20);
add(n1);
b1= new JButton("Aceptar");
b1.setBounds(170,60,90,20);
add(b1);
b1.addActionListener(this);
}
public void actionPerformed(ActionEvent v)
{
if(v.getSource()==b1)
{
System.exit(0);
}
}
}

8
8

También podría gustarte