Compare commits
2 Commits
eb45b06de4
...
03b14e2c37
Author | SHA1 | Date |
---|---|---|
Soka_jplr | 03b14e2c37 | |
Soka_jplr | e6210edd09 |
|
@ -1,6 +1,9 @@
|
||||||
create database cocina;
|
create database cocina;
|
||||||
|
|
||||||
use cocina;
|
use cocina;
|
||||||
|
#Crear un usuario para ocuparlo en el programa y no estar cambiando el archivo conexion.java
|
||||||
|
CREATE USER 'UserRemoto' @'localhost' IDENTIFIED BY 'password123';
|
||||||
|
GRANT ALL PRIVILEGES ON cocina TO 'UserRemoto' @'localhost';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
drop table usuarios;
|
drop table usuarios;
|
||||||
create table usuarios(
|
create table usuarios(
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
compile.on.save=true
|
compile.on.save=true
|
||||||
user.properties.file=C:\\Users\\reyes\\AppData\\Roaming\\NetBeans\\18\\build.properties
|
user.properties.file=C:\\Users\\juanl\\AppData\\Roaming\\NetBeans\\19\\build.properties
|
||||||
|
|
|
@ -3,12 +3,13 @@
|
||||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
<group>
|
<group>
|
||||||
<file>file:/C:/Users/reyes/Documents/ProyectoSalaConciertos/SalaDeConciertos/src/Vista/Vista.java</file>
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Vista/MetodoPago.java</file>
|
||||||
<file>file:/C:/Users/reyes/Documents/ProyectoSalaConciertos/SalaDeConciertos/src/Vista/metodoPago.java</file>
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Controlador/ControladorLogin.java</file>
|
||||||
<file>file:/C:/Users/reyes/Documents/ProyectoSalaConciertos/SalaDeConciertos/src/Vista/seleccionarBoleto.java</file>
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Vista/Login.java</file>
|
||||||
<file>file:/C:/Users/reyes/Documents/ProyectoSalaConciertos/SalaDeConciertos/src/Vista/confirmacionPago.java</file>
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Vista/SalaPrincipal.java</file>
|
||||||
<file>file:/C:/Users/reyes/Documents/ProyectoSalaConciertos/SalaDeConciertos/src/Vista/salaPrincipal.java</file>
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Modelo/Consulta.java</file>
|
||||||
<file>file:/C:/Users/reyes/Documents/ProyectoSalaConciertos/SalaDeConciertos/src/Vista/login.java</file>
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Vista/seleccionarBoleto.java</file>
|
||||||
|
<file>file:/C:/Users/juanl/Documents/SalaDeConciertos/src/Controlador/ControladorRegistro.java</file>
|
||||||
</group>
|
</group>
|
||||||
</open-files>
|
</open-files>
|
||||||
</project-private>
|
</project-private>
|
||||||
|
|
|
@ -73,7 +73,7 @@ jlink.additionalmodules=
|
||||||
jlink.additionalparam=
|
jlink.additionalparam=
|
||||||
jlink.launcher=true
|
jlink.launcher=true
|
||||||
jlink.launcher.name=SalaDeConciertos
|
jlink.launcher.name=SalaDeConciertos
|
||||||
main.class=
|
main.class=Main.Main
|
||||||
manifest.file=manifest.mf
|
manifest.file=manifest.mf
|
||||||
meta.inf.dir=${src.dir}/META-INF
|
meta.inf.dir=${src.dir}/META-INF
|
||||||
mkdist.disabled=false
|
mkdist.disabled=false
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/*
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|
||||||
*/
|
|
||||||
package Controlador;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author juanl
|
|
||||||
*/
|
|
||||||
public class Controlador {
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
|
||||||
|
package Controlador;
|
||||||
|
|
||||||
|
import Modelo.Consulta;
|
||||||
|
import Modelo.Usuario;
|
||||||
|
import Vista.Login;
|
||||||
|
import Vista.Registro;
|
||||||
|
import Vista.SalaPrincipal;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author Juan Ska
|
||||||
|
*/
|
||||||
|
public class ControladorLogin implements ActionListener{
|
||||||
|
private Login login;
|
||||||
|
private Consulta consulta = new Consulta();
|
||||||
|
public ControladorLogin(Login login) {
|
||||||
|
this.login = login;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
//Valora que boton presiono el Usuario.
|
||||||
|
if(e.getSource()== login.getBtnLogin()){
|
||||||
|
String valorPass = new String(login.getTxtContraseñaLogin().getPassword());
|
||||||
|
//Valora si los campos etan vacios
|
||||||
|
if(login.getTxtNombreUsuario().getText().isEmpty()||valorPass.isEmpty()){
|
||||||
|
JOptionPane.showMessageDialog(null, "Error. Favor de llenar Todos los campos");
|
||||||
|
}else{
|
||||||
|
//Busca al usuario en la base de datos
|
||||||
|
Usuario user = new Usuario(login.getTxtNombreUsuario().getText(), valorPass);
|
||||||
|
if(consulta.verificarUsuario(user)){
|
||||||
|
//Abre una nueva ventana
|
||||||
|
JOptionPane.showMessageDialog(null, "Bienvenido " + user.getNombre());
|
||||||
|
SalaPrincipal principal = new SalaPrincipal(user);
|
||||||
|
principal.setVisible(true);
|
||||||
|
login.dispose();
|
||||||
|
}else{
|
||||||
|
JOptionPane.showMessageDialog(null, "Error. Nombre de usuario o Contraseña incorrectas");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Abre la ventana de registro
|
||||||
|
if(e.getSource()== login.getBtnRegistrarse()){
|
||||||
|
Registro registro = new Registro();
|
||||||
|
registro.setLocationRelativeTo(null);
|
||||||
|
registro.setVisible(true);
|
||||||
|
login.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package Controlador;
|
||||||
|
|
||||||
|
import Modelo.Consulta;
|
||||||
|
import Vista.Registro;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.KeyListener;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author Juan Ska
|
||||||
|
*/
|
||||||
|
public class ControladorRegistro extends Thread{
|
||||||
|
private Registro registro;
|
||||||
|
private String name="";
|
||||||
|
private Consulta consulta = new Consulta();
|
||||||
|
public ControladorRegistro(Registro registro) {
|
||||||
|
this.registro = registro;
|
||||||
|
run();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void run(){
|
||||||
|
registro.getBtnRegistrar().addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
registro.getTxtNombreUsuarioRegistro().addKeyListener(new KeyListener() {
|
||||||
|
@Override
|
||||||
|
public void keyTyped(KeyEvent e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyReleased(KeyEvent e) {
|
||||||
|
name = registro.getTxtNombreUsuarioRegistro().getText();
|
||||||
|
if(consulta.usuarioInvalido(name)){
|
||||||
|
registro.getLabelName().setForeground(Color.red);
|
||||||
|
registro.getLabelName().setText("No puedes usar ese nombre");
|
||||||
|
registro.getBtnRegistrar().setEnabled(false);
|
||||||
|
}else{
|
||||||
|
registro.getLabelName().setForeground(Color.GREEN);
|
||||||
|
registro.getLabelName().setText("Nombre Disponible");
|
||||||
|
registro.getBtnRegistrar().setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -1,8 +1,13 @@
|
||||||
package Main;
|
package Main;
|
||||||
|
|
||||||
|
import Vista.Login;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Login login = new Login();
|
||||||
|
login.setLocationRelativeTo(null);
|
||||||
|
login.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
package Modelo;
|
||||||
|
import java.sql.*;
|
||||||
|
|
||||||
|
public class Conexion {
|
||||||
|
|
||||||
|
private static Connection conexion;
|
||||||
|
private static Conexion istancia;
|
||||||
|
private static final String url = "jdbc:mysql://localhost:3306/cocina";
|
||||||
|
private static final String user = "UserRemoto";
|
||||||
|
private static final String password ="password123";
|
||||||
|
|
||||||
|
private Conexion(){}
|
||||||
|
|
||||||
|
public Connection conectar(){
|
||||||
|
try {
|
||||||
|
Class.forName("com.mysql.cj.jdbc.Driver");
|
||||||
|
conexion = DriverManager.getConnection(url, user, password);
|
||||||
|
if(conexion!=null){
|
||||||
|
System.out.println("Conexion Exitosa");
|
||||||
|
return conexion;
|
||||||
|
}else{
|
||||||
|
System.out.println("ERROR no se pudo conectar");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("ERROR: " + e);
|
||||||
|
}
|
||||||
|
return conexion;
|
||||||
|
}
|
||||||
|
public void cerrarconexion() throws SQLException{
|
||||||
|
try {
|
||||||
|
conexion.close();
|
||||||
|
System.out.println("Se desconecto de la base");
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("ERROR: " + e);
|
||||||
|
conexion.close();
|
||||||
|
}finally{
|
||||||
|
conexion.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Conexion getInstance(){
|
||||||
|
if(istancia==null){
|
||||||
|
istancia = new Conexion();
|
||||||
|
}
|
||||||
|
return istancia;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package Modelo;
|
||||||
|
|
||||||
|
import java.sql.*;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
|
public class Consulta {
|
||||||
|
private static final Conexion cn = Conexion.getInstance();
|
||||||
|
private static Connection conexion;
|
||||||
|
public Consulta(){}
|
||||||
|
|
||||||
|
public boolean verificarUsuario(Usuario user){
|
||||||
|
boolean verificacion =false;
|
||||||
|
try {
|
||||||
|
conexion = cn.conectar();
|
||||||
|
Statement stm;
|
||||||
|
String sql ="select * from Usuarios "
|
||||||
|
+ "where nombreUsuario= '"+user.getNombre()+"' and password='"+user.getPassword()+"'";
|
||||||
|
stm = conexion.createStatement();
|
||||||
|
ResultSet resultado = stm.executeQuery(sql);
|
||||||
|
if(resultado.next()){
|
||||||
|
verificacion = true;
|
||||||
|
}else{
|
||||||
|
verificacion = false;
|
||||||
|
}
|
||||||
|
cn.cerrarconexion();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(ex);
|
||||||
|
}
|
||||||
|
return verificacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean usuarioInvalido(String name) {
|
||||||
|
boolean verificacion =false;
|
||||||
|
try {
|
||||||
|
conexion = cn.conectar();
|
||||||
|
Statement stm;
|
||||||
|
String sql ="select * from Usuarios "
|
||||||
|
+ "where nombreUsuario= '"+name+"'";
|
||||||
|
stm = conexion.createStatement();
|
||||||
|
ResultSet resultado = stm.executeQuery(sql);
|
||||||
|
if(resultado.next()){
|
||||||
|
verificacion = true;
|
||||||
|
}else{
|
||||||
|
verificacion = false;
|
||||||
|
}
|
||||||
|
cn.cerrarconexion();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(ex);
|
||||||
|
}
|
||||||
|
return verificacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
/*
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|
||||||
*/
|
|
||||||
package Modelo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author juanl
|
|
||||||
*/
|
|
||||||
public class Modelo {
|
|
||||||
|
|
||||||
}
|
|
|
@ -18,6 +18,12 @@ public class Usuario {
|
||||||
public Usuario(){
|
public Usuario(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Usuario(String nombre, String password) {
|
||||||
|
this.nombre = nombre;
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getNombre() {
|
public String getNombre() {
|
||||||
return nombre;
|
return nombre;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
package Vista;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author juanl
|
|
||||||
*/
|
|
||||||
public class Vista {
|
|
||||||
|
|
||||||
}
|
|
|
@ -11,14 +11,14 @@ import javax.swing.ImageIcon;
|
||||||
*
|
*
|
||||||
* @author reyes
|
* @author reyes
|
||||||
*/
|
*/
|
||||||
public class confirmacionPago extends javax.swing.JFrame {
|
public class ConfirmacionPago extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form confirmacionPago
|
* Creates new form confirmacionPago
|
||||||
*/
|
*/
|
||||||
ImageIcon imagen;
|
ImageIcon imagen;
|
||||||
|
|
||||||
public confirmacionPago() {
|
public ConfirmacionPago() {
|
||||||
initComponents();
|
initComponents();
|
||||||
ImageIcon icon = new ImageIcon("C:\\Users\\reyes\\Documents\\ProyectoSalaConciertos\\SalaDeConciertos\\src\\Vista\\Images\\musica.png");
|
ImageIcon icon = new ImageIcon("C:\\Users\\reyes\\Documents\\ProyectoSalaConciertos\\SalaDeConciertos\\src\\Vista\\Images\\musica.png");
|
||||||
Image image = icon.getImage();
|
Image image = icon.getImage();
|
||||||
|
|
|
@ -165,9 +165,6 @@
|
||||||
<Color blue="e6" green="e6" red="e6" type="rgb"/>
|
<Color blue="e6" green="e6" red="e6" type="rgb"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtNombreUsuarioActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JButton" name="btnLogin">
|
<Component class="javax.swing.JButton" name="btnLogin">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -179,9 +176,6 @@
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="Iniciar Sesion"/>
|
<Property name="text" type="java.lang.String" value="Iniciar Sesion"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoginActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -235,9 +229,6 @@
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="Registrarse"/>
|
<Property name="text" type="java.lang.String" value="Registrarse"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnRegistrarseActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JPasswordField" name="txtContraseñaLogin">
|
<Component class="javax.swing.JPasswordField" name="txtContraseñaLogin">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
|
|
@ -4,19 +4,43 @@
|
||||||
*/
|
*/
|
||||||
package Vista;
|
package Vista;
|
||||||
|
|
||||||
|
import Controlador.ControladorLogin;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JPasswordField;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author reyes
|
* @author reyes
|
||||||
*/
|
*/
|
||||||
public class login extends javax.swing.JFrame {
|
public class Login extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form login
|
* Creates new form login
|
||||||
*/
|
*/
|
||||||
public login() {
|
ControladorLogin contorlador = new ControladorLogin(this);
|
||||||
|
public Login() {
|
||||||
initComponents();
|
initComponents();
|
||||||
setTitle("Inicio Sesion");
|
setTitle("Inicio Sesion");
|
||||||
setResizable(false);
|
setResizable(false);
|
||||||
|
btnLogin.addActionListener(contorlador);
|
||||||
|
btnRegistrarse.addActionListener(contorlador);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getBtnLogin() {
|
||||||
|
return btnLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getBtnRegistrarse() {
|
||||||
|
return btnRegistrarse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JPasswordField getTxtContraseñaLogin() {
|
||||||
|
return txtContraseñaLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTextField getTxtNombreUsuario() {
|
||||||
|
return txtNombreUsuario;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,20 +81,10 @@ public class login extends javax.swing.JFrame {
|
||||||
jLabel2.setText("Un sitio seguro para comprar tus boletos para tus conciertos favoritos");
|
jLabel2.setText("Un sitio seguro para comprar tus boletos para tus conciertos favoritos");
|
||||||
|
|
||||||
txtNombreUsuario.setBackground(new java.awt.Color(230, 230, 230));
|
txtNombreUsuario.setBackground(new java.awt.Color(230, 230, 230));
|
||||||
txtNombreUsuario.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
txtNombreUsuarioActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnLogin.setBackground(new java.awt.Color(51, 51, 51));
|
btnLogin.setBackground(new java.awt.Color(51, 51, 51));
|
||||||
btnLogin.setForeground(new java.awt.Color(255, 255, 255));
|
btnLogin.setForeground(new java.awt.Color(255, 255, 255));
|
||||||
btnLogin.setText("Iniciar Sesion");
|
btnLogin.setText("Iniciar Sesion");
|
||||||
btnLogin.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
btnLoginActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
jLabel3.setFont(new java.awt.Font("Centaur", 0, 12)); // NOI18N
|
jLabel3.setFont(new java.awt.Font("Centaur", 0, 12)); // NOI18N
|
||||||
jLabel3.setText("Ayuda");
|
jLabel3.setText("Ayuda");
|
||||||
|
@ -91,11 +105,6 @@ public class login extends javax.swing.JFrame {
|
||||||
btnRegistrarse.setBackground(new java.awt.Color(51, 51, 51));
|
btnRegistrarse.setBackground(new java.awt.Color(51, 51, 51));
|
||||||
btnRegistrarse.setForeground(new java.awt.Color(255, 255, 255));
|
btnRegistrarse.setForeground(new java.awt.Color(255, 255, 255));
|
||||||
btnRegistrarse.setText("Registrarse");
|
btnRegistrarse.setText("Registrarse");
|
||||||
btnRegistrarse.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
btnRegistrarseActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
txtContraseñaLogin.setBackground(new java.awt.Color(230, 230, 230));
|
txtContraseñaLogin.setBackground(new java.awt.Color(230, 230, 230));
|
||||||
|
|
||||||
|
@ -187,18 +196,6 @@ public class login extends javax.swing.JFrame {
|
||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_btnLoginActionPerformed
|
|
||||||
|
|
||||||
private void txtNombreUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNombreUsuarioActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_txtNombreUsuarioActionPerformed
|
|
||||||
|
|
||||||
private void btnRegistrarseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRegistrarseActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_btnRegistrarseActionPerformed
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jPanel1" min="-2" pref="288" max="-2" attributes="0"/>
|
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace pref="33" max="32767" attributes="0"/>
|
<EmptySpace pref="29" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
|
|
@ -8,12 +8,12 @@ package Vista;
|
||||||
*
|
*
|
||||||
* @author reyes
|
* @author reyes
|
||||||
*/
|
*/
|
||||||
public class metodoPago extends javax.swing.JFrame {
|
public class MetodoPago extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form metodoPago
|
* Creates new form metodoPago
|
||||||
*/
|
*/
|
||||||
public metodoPago() {
|
public MetodoPago() {
|
||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public class metodoPago extends javax.swing.JFrame {
|
||||||
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||||
.addContainerGap(33, Short.MAX_VALUE))
|
.addContainerGap(29, Short.MAX_VALUE))
|
||||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||||
|
@ -191,7 +191,7 @@ public class metodoPago extends javax.swing.JFrame {
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(0, 0, Short.MAX_VALUE))
|
.addGap(0, 0, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
|
@ -216,40 +216,6 @@ public class metodoPago extends javax.swing.JFrame {
|
||||||
// TODO add your handling code here:
|
// TODO add your handling code here:
|
||||||
}//GEN-LAST:event_jButton2ActionPerformed
|
}//GEN-LAST:event_jButton2ActionPerformed
|
||||||
|
|
||||||
/**
|
|
||||||
* @param args the command line arguments
|
|
||||||
*/
|
|
||||||
public static void main(String args[]) {
|
|
||||||
/* Set the Nimbus look and feel */
|
|
||||||
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
|
||||||
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
|
||||||
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
|
||||||
*/
|
|
||||||
try {
|
|
||||||
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
|
||||||
if ("Nimbus".equals(info.getName())) {
|
|
||||||
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (ClassNotFoundException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(metodoPago.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
} catch (InstantiationException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(metodoPago.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
} catch (IllegalAccessException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(metodoPago.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(metodoPago.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
}
|
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
/* Create and display the form */
|
|
||||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
new metodoPago().setVisible(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton jButton1;
|
private javax.swing.JButton jButton1;
|
||||||
|
|
|
@ -1,19 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||||
<NonVisualComponents>
|
|
||||||
<Component class="javax.swing.JTextField" name="txtContraseña1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
|
||||||
<Color blue="e6" green="e6" red="e6" type="rgb"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtContraseña1ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</NonVisualComponents>
|
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="defaultCloseOperation" type="int" value="3"/>
|
<Property name="defaultCloseOperation" type="int" value="3"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
@ -67,18 +54,7 @@
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="-2" pref="66" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="66" max="-2" attributes="0"/>
|
||||||
<Component id="jButton2" min="-2" pref="147" max="-2" attributes="0"/>
|
<Component id="btnRegistrar" min="-2" pref="147" max="-2" attributes="0"/>
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
|
||||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="txtNombreUsuarioRegistro" max="32767" attributes="0"/>
|
|
||||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="txtCorreoRegistro" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPasswordField1" alignment="0" pref="220" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||||
|
@ -94,6 +70,18 @@
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
|
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="txtNombreUsuarioRegistro" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="txtCorreoRegistro" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="txtPassword" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="labelName" alignment="0" min="-2" pref="220" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace pref="24" max="32767" attributes="0"/>
|
<EmptySpace pref="24" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -123,13 +111,15 @@
|
||||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="txtNombreUsuarioRegistro" min="-2" max="-2" attributes="0"/>
|
<Component id="txtNombreUsuarioRegistro" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
||||||
|
<Component id="labelName" min="-2" pref="22" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="jPasswordField1" min="-2" max="-2" attributes="0"/>
|
<Component id="txtPassword" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
|
||||||
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
|
<Component id="btnRegistrar" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="53" max="32767" attributes="0"/>
|
<EmptySpace pref="38" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
|
@ -172,9 +162,6 @@
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtCorreoRegistroActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtNombreUsuarioRegistro">
|
<Component class="javax.swing.JTextField" name="txtNombreUsuarioRegistro">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -183,9 +170,6 @@
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtNombreUsuarioRegistroActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -203,7 +187,7 @@
|
||||||
<Property name="text" type="java.lang.String" value="Registro"/>
|
<Property name="text" type="java.lang.String" value="Registro"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JButton" name="jButton2">
|
<Component class="javax.swing.JButton" name="btnRegistrar">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
<Color blue="33" green="33" red="33" type="rgb"/>
|
<Color blue="33" green="33" red="33" type="rgb"/>
|
||||||
|
@ -213,11 +197,8 @@
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="Registrarse"/>
|
<Property name="text" type="java.lang.String" value="Registrarse"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JPasswordField" name="jPasswordField1">
|
<Component class="javax.swing.JPasswordField" name="txtPassword">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
<Color blue="e6" green="e6" red="e6" type="rgb"/>
|
<Color blue="e6" green="e6" red="e6" type="rgb"/>
|
||||||
|
@ -225,9 +206,8 @@
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="logoimagen">
|
<Component class="javax.swing.JLabel" name="logoimagen">
|
||||||
<Properties>
|
</Component>
|
||||||
<Property name="text" type="java.lang.String" value="."/>
|
<Component class="javax.swing.JLabel" name="labelName">
|
||||||
</Properties>
|
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -4,37 +4,64 @@
|
||||||
*/
|
*/
|
||||||
package Vista;
|
package Vista;
|
||||||
|
|
||||||
|
import Controlador.ControladorRegistro;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPasswordField;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author reyes
|
* @author reyes
|
||||||
*/
|
*/
|
||||||
public class registro extends javax.swing.JFrame {
|
public class Registro extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form registro
|
* Creates new form registro
|
||||||
*/
|
*/
|
||||||
ImageIcon imagen;
|
ImageIcon imagen;
|
||||||
|
|
||||||
public registro() {
|
public Registro() {
|
||||||
setTitle("Registro");
|
setTitle("Registro");
|
||||||
ImageIcon icon = new ImageIcon("C:\\Users\\reyes\\Documents\\ProyectoSalaConciertos\\SalaDeConciertos\\src\\Vista\\Images\\musica.png");
|
ImageIcon icon = new ImageIcon("src\\Images\\music.png");
|
||||||
Image image = icon.getImage();
|
Image image = icon.getImage();
|
||||||
this.setIconImage(image);
|
this.setIconImage(image);
|
||||||
this.setResizable(false);
|
this.setResizable(false);
|
||||||
this.setLocation(470, 130);
|
this.setLocation(470, 130);
|
||||||
initComponents();
|
initComponents();
|
||||||
|
ControladorRegistro controlador = new ControladorRegistro(this);
|
||||||
slogan();
|
slogan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JButton getBtnRegistrar() {
|
||||||
|
return btnRegistrar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTextField getTxtCorreoRegistro() {
|
||||||
|
return txtCorreoRegistro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTextField getTxtNombreUsuarioRegistro() {
|
||||||
|
return txtNombreUsuarioRegistro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JPasswordField getTxtPassword() {
|
||||||
|
return txtPassword;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JLabel getLabelName() {
|
||||||
|
return labelName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void slogan() {
|
public void slogan() {
|
||||||
imagen = new ImageIcon("C:\\Users\\reyes\\Documents\\ProyectoSalaConciertos\\SalaDeConciertos\\src\\Vista\\Images\\musicas.png");
|
ImageIcon imagenIcon = new ImageIcon("src\\Images\\music.png");
|
||||||
logoimagen.setIcon(imagen);
|
Image imagenOriginal = imagenIcon.getImage();
|
||||||
//logoimagen.setPreferredSize(new Dimension(150, 120));
|
Image imagenEscalada = imagenOriginal.getScaledInstance(60,60, Image.SCALE_SMOOTH); // Ajusta el tamaño a 300x300 píxeles
|
||||||
|
ImageIcon imagenFinal = new ImageIcon(imagenEscalada);
|
||||||
|
logoimagen.setIcon(imagenFinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +74,6 @@ public class registro extends javax.swing.JFrame {
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
txtContraseña1 = new javax.swing.JTextField();
|
|
||||||
panelRegistro = new javax.swing.JPanel();
|
panelRegistro = new javax.swing.JPanel();
|
||||||
logo = new javax.swing.JLabel();
|
logo = new javax.swing.JLabel();
|
||||||
jLabel6 = new javax.swing.JLabel();
|
jLabel6 = new javax.swing.JLabel();
|
||||||
|
@ -56,17 +82,10 @@ public class registro extends javax.swing.JFrame {
|
||||||
txtNombreUsuarioRegistro = new javax.swing.JTextField();
|
txtNombreUsuarioRegistro = new javax.swing.JTextField();
|
||||||
jLabel1 = new javax.swing.JLabel();
|
jLabel1 = new javax.swing.JLabel();
|
||||||
jLabel3 = new javax.swing.JLabel();
|
jLabel3 = new javax.swing.JLabel();
|
||||||
jButton2 = new javax.swing.JButton();
|
btnRegistrar = new javax.swing.JButton();
|
||||||
jPasswordField1 = new javax.swing.JPasswordField();
|
txtPassword = new javax.swing.JPasswordField();
|
||||||
logoimagen = new javax.swing.JLabel();
|
logoimagen = new javax.swing.JLabel();
|
||||||
|
labelName = new javax.swing.JLabel();
|
||||||
txtContraseña1.setBackground(new java.awt.Color(230, 230, 230));
|
|
||||||
txtContraseña1.setToolTipText("");
|
|
||||||
txtContraseña1.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
txtContraseña1ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
|
@ -85,19 +104,9 @@ public class registro extends javax.swing.JFrame {
|
||||||
|
|
||||||
txtCorreoRegistro.setBackground(new java.awt.Color(230, 230, 230));
|
txtCorreoRegistro.setBackground(new java.awt.Color(230, 230, 230));
|
||||||
txtCorreoRegistro.setToolTipText("");
|
txtCorreoRegistro.setToolTipText("");
|
||||||
txtCorreoRegistro.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
txtCorreoRegistroActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
txtNombreUsuarioRegistro.setBackground(new java.awt.Color(230, 230, 230));
|
txtNombreUsuarioRegistro.setBackground(new java.awt.Color(230, 230, 230));
|
||||||
txtNombreUsuarioRegistro.setToolTipText("");
|
txtNombreUsuarioRegistro.setToolTipText("");
|
||||||
txtNombreUsuarioRegistro.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
txtNombreUsuarioRegistroActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
jLabel1.setText("Contraseña:");
|
jLabel1.setText("Contraseña:");
|
||||||
|
|
||||||
|
@ -105,18 +114,11 @@ public class registro extends javax.swing.JFrame {
|
||||||
jLabel3.setFont(new java.awt.Font("Microsoft YaHei", 0, 18)); // NOI18N
|
jLabel3.setFont(new java.awt.Font("Microsoft YaHei", 0, 18)); // NOI18N
|
||||||
jLabel3.setText("Registro");
|
jLabel3.setText("Registro");
|
||||||
|
|
||||||
jButton2.setBackground(new java.awt.Color(51, 51, 51));
|
btnRegistrar.setBackground(new java.awt.Color(51, 51, 51));
|
||||||
jButton2.setForeground(new java.awt.Color(255, 255, 255));
|
btnRegistrar.setForeground(new java.awt.Color(255, 255, 255));
|
||||||
jButton2.setText("Registrarse");
|
btnRegistrar.setText("Registrarse");
|
||||||
jButton2.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
jButton2ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
jPasswordField1.setBackground(new java.awt.Color(230, 230, 230));
|
txtPassword.setBackground(new java.awt.Color(230, 230, 230));
|
||||||
|
|
||||||
logoimagen.setText(".");
|
|
||||||
|
|
||||||
javax.swing.GroupLayout panelRegistroLayout = new javax.swing.GroupLayout(panelRegistro);
|
javax.swing.GroupLayout panelRegistroLayout = new javax.swing.GroupLayout(panelRegistro);
|
||||||
panelRegistro.setLayout(panelRegistroLayout);
|
panelRegistro.setLayout(panelRegistroLayout);
|
||||||
|
@ -126,16 +128,7 @@ public class registro extends javax.swing.JFrame {
|
||||||
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addGroup(panelRegistroLayout.createSequentialGroup()
|
.addGroup(panelRegistroLayout.createSequentialGroup()
|
||||||
.addGap(66, 66, 66)
|
.addGap(66, 66, 66)
|
||||||
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(btnRegistrar, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addGroup(panelRegistroLayout.createSequentialGroup()
|
|
||||||
.addGap(30, 30, 30)
|
|
||||||
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
||||||
.addComponent(jLabel6)
|
|
||||||
.addComponent(jLabel1)
|
|
||||||
.addComponent(txtNombreUsuarioRegistro)
|
|
||||||
.addComponent(jLabel7)
|
|
||||||
.addComponent(txtCorreoRegistro)
|
|
||||||
.addComponent(jPasswordField1, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)))
|
|
||||||
.addGroup(panelRegistroLayout.createSequentialGroup()
|
.addGroup(panelRegistroLayout.createSequentialGroup()
|
||||||
.addGap(18, 18, 18)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(logoimagen, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(logoimagen, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
@ -145,7 +138,17 @@ public class registro extends javax.swing.JFrame {
|
||||||
.addComponent(jLabel3))
|
.addComponent(jLabel3))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelRegistroLayout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelRegistroLayout.createSequentialGroup()
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(logo)))))
|
.addComponent(logo))))
|
||||||
|
.addGroup(panelRegistroLayout.createSequentialGroup()
|
||||||
|
.addGap(30, 30, 30)
|
||||||
|
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
|
.addComponent(jLabel6)
|
||||||
|
.addComponent(jLabel1)
|
||||||
|
.addComponent(txtNombreUsuarioRegistro)
|
||||||
|
.addComponent(jLabel7)
|
||||||
|
.addComponent(txtCorreoRegistro)
|
||||||
|
.addComponent(txtPassword)
|
||||||
|
.addComponent(labelName, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||||
.addContainerGap(24, Short.MAX_VALUE))
|
.addContainerGap(24, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
panelRegistroLayout.setVerticalGroup(
|
panelRegistroLayout.setVerticalGroup(
|
||||||
|
@ -168,13 +171,15 @@ public class registro extends javax.swing.JFrame {
|
||||||
.addComponent(jLabel6)
|
.addComponent(jLabel6)
|
||||||
.addGap(18, 18, 18)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(txtNombreUsuarioRegistro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(txtNombreUsuarioRegistro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(18, 18, 18)
|
.addGap(5, 5, 5)
|
||||||
|
.addComponent(labelName, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addGap(18, 18, 18)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(33, 33, 33)
|
.addGap(33, 33, 33)
|
||||||
.addComponent(jButton2)
|
.addComponent(btnRegistrar)
|
||||||
.addContainerGap(53, Short.MAX_VALUE))
|
.addContainerGap(38, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
|
@ -196,35 +201,19 @@ public class registro extends javax.swing.JFrame {
|
||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void txtContraseña1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtContraseña1ActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_txtContraseña1ActionPerformed
|
|
||||||
|
|
||||||
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_jButton2ActionPerformed
|
|
||||||
|
|
||||||
private void txtNombreUsuarioRegistroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNombreUsuarioRegistroActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_txtNombreUsuarioRegistroActionPerformed
|
|
||||||
|
|
||||||
private void txtCorreoRegistroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCorreoRegistroActionPerformed
|
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_txtCorreoRegistroActionPerformed
|
|
||||||
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton jButton2;
|
private javax.swing.JButton btnRegistrar;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
private javax.swing.JLabel jLabel3;
|
private javax.swing.JLabel jLabel3;
|
||||||
private javax.swing.JLabel jLabel6;
|
private javax.swing.JLabel jLabel6;
|
||||||
private javax.swing.JLabel jLabel7;
|
private javax.swing.JLabel jLabel7;
|
||||||
private javax.swing.JPasswordField jPasswordField1;
|
private javax.swing.JLabel labelName;
|
||||||
private javax.swing.JLabel logo;
|
private javax.swing.JLabel logo;
|
||||||
private javax.swing.JLabel logoimagen;
|
private javax.swing.JLabel logoimagen;
|
||||||
private javax.swing.JPanel panelRegistro;
|
private javax.swing.JPanel panelRegistro;
|
||||||
private javax.swing.JTextField txtContraseña1;
|
|
||||||
private javax.swing.JTextField txtCorreoRegistro;
|
private javax.swing.JTextField txtCorreoRegistro;
|
||||||
private javax.swing.JTextField txtNombreUsuarioRegistro;
|
private javax.swing.JTextField txtNombreUsuarioRegistro;
|
||||||
|
private javax.swing.JPasswordField txtPassword;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,8 +196,6 @@
|
||||||
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="96" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="96" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="panelGeneral" min="-2" max="-2" attributes="0"/>
|
<Component id="panelGeneral" min="-2" max="-2" attributes="0"/>
|
||||||
|
@ -210,14 +208,8 @@
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Component id="panelC" min="-2" max="-2" attributes="0"/>
|
<Component id="panelC" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="-2" pref="53" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="53" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
package Vista;
|
package Vista;
|
||||||
|
|
||||||
|
import Modelo.Usuario;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
@ -19,14 +20,15 @@ import javax.swing.JButton;
|
||||||
*
|
*
|
||||||
* @author reyes
|
* @author reyes
|
||||||
*/
|
*/
|
||||||
public class salaPrincipal extends javax.swing.JFrame {
|
public class SalaPrincipal extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form salaPrincipal
|
* Creates new form salaPrincipal
|
||||||
*/
|
*/
|
||||||
ImageIcon imagen;
|
ImageIcon imagen;
|
||||||
|
Usuario user;
|
||||||
public salaPrincipal() {
|
public SalaPrincipal(Usuario user) {
|
||||||
|
this.user = user;
|
||||||
initComponents();
|
initComponents();
|
||||||
setTitle("Sala Principal");
|
setTitle("Sala Principal");
|
||||||
setLocationRelativeTo(null);
|
setLocationRelativeTo(null);
|
||||||
|
|
|
@ -1,27 +1,14 @@
|
||||||
/*
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
|
|
||||||
*/
|
|
||||||
package Vista;
|
package Vista;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author reyes
|
* @author reyes
|
||||||
*/
|
*/
|
||||||
public class seleccionarBoleto extends javax.swing.JFrame {
|
public class seleccionarBoleto extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates new form seleccionarBoleto
|
|
||||||
*/
|
|
||||||
public seleccionarBoleto() {
|
public seleccionarBoleto() {
|
||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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")
|
@SuppressWarnings("unchecked")
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
@ -206,40 +193,6 @@ public class seleccionarBoleto extends javax.swing.JFrame {
|
||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
/**
|
|
||||||
* @param args the command line arguments
|
|
||||||
*/
|
|
||||||
public static void main(String args[]) {
|
|
||||||
/* Set the Nimbus look and feel */
|
|
||||||
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
|
||||||
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
|
||||||
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
|
||||||
*/
|
|
||||||
try {
|
|
||||||
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
|
||||||
if ("Nimbus".equals(info.getName())) {
|
|
||||||
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (ClassNotFoundException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(seleccionarBoleto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
} catch (InstantiationException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(seleccionarBoleto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
} catch (IllegalAccessException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(seleccionarBoleto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
|
|
||||||
java.util.logging.Logger.getLogger(seleccionarBoleto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
||||||
}
|
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
/* Create and display the form */
|
|
||||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
new seleccionarBoleto().setVisible(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton jButton1;
|
private javax.swing.JButton jButton1;
|
||||||
|
|
Loading…
Reference in New Issue