diff --git a/build/classes/Controlador/ControladorBoleto.class b/build/classes/Controlador/ControladorBoleto.class
index e2f4a63..3fb6a33 100644
Binary files a/build/classes/Controlador/ControladorBoleto.class and b/build/classes/Controlador/ControladorBoleto.class differ
diff --git a/build/classes/Controlador/ControladorEcenario.class b/build/classes/Controlador/ControladorEcenario.class
index 4aa228d..eaaa49e 100644
Binary files a/build/classes/Controlador/ControladorEcenario.class and b/build/classes/Controlador/ControladorEcenario.class differ
diff --git a/build/classes/Main/Main.class b/build/classes/Main/Main.class
index fc8bf1e..600fbe0 100644
Binary files a/build/classes/Main/Main.class and b/build/classes/Main/Main.class differ
diff --git a/build/classes/Modelo/Consulta.class b/build/classes/Modelo/Consulta.class
index b7563a5..21d3ebf 100644
Binary files a/build/classes/Modelo/Consulta.class and b/build/classes/Modelo/Consulta.class differ
diff --git a/build/classes/Modelo/Tarjeta.class b/build/classes/Modelo/Tarjeta.class
index b1c0db8..b76d4f4 100644
Binary files a/build/classes/Modelo/Tarjeta.class and b/build/classes/Modelo/Tarjeta.class differ
diff --git a/build/classes/Vista/ConfirmacionPago.class b/build/classes/Vista/ConfirmacionPago.class
index dae17be..a378a7b 100644
Binary files a/build/classes/Vista/ConfirmacionPago.class and b/build/classes/Vista/ConfirmacionPago.class differ
diff --git a/build/classes/Vista/MetodoPago$1.class b/build/classes/Vista/MetodoPago$1.class
deleted file mode 100644
index 3e75688..0000000
Binary files a/build/classes/Vista/MetodoPago$1.class and /dev/null differ
diff --git a/build/classes/Vista/MetodoPago$2.class b/build/classes/Vista/MetodoPago$2.class
deleted file mode 100644
index 1905c97..0000000
Binary files a/build/classes/Vista/MetodoPago$2.class and /dev/null differ
diff --git a/build/classes/Vista/MetodoPago$3.class b/build/classes/Vista/MetodoPago$3.class
deleted file mode 100644
index 351269e..0000000
Binary files a/build/classes/Vista/MetodoPago$3.class and /dev/null differ
diff --git a/build/classes/Vista/MetodoPago.class b/build/classes/Vista/MetodoPago.class
index 3a85959..72c6291 100644
Binary files a/build/classes/Vista/MetodoPago.class and b/build/classes/Vista/MetodoPago.class differ
diff --git a/build/classes/Vista/SalaPrincipal.class b/build/classes/Vista/SalaPrincipal.class
index be9997e..fe81e56 100644
Binary files a/build/classes/Vista/SalaPrincipal.class and b/build/classes/Vista/SalaPrincipal.class differ
diff --git a/build/classes/Vista/seleccionarBoleto.class b/build/classes/Vista/seleccionarBoleto.class
index 31a6038..3c13101 100644
Binary files a/build/classes/Vista/seleccionarBoleto.class and b/build/classes/Vista/seleccionarBoleto.class differ
diff --git a/src/Controlador/ControladorBoleto.java b/src/Controlador/ControladorBoleto.java
index b51846b..79adde8 100644
--- a/src/Controlador/ControladorBoleto.java
+++ b/src/Controlador/ControladorBoleto.java
@@ -3,7 +3,7 @@ package Controlador;
import Modelo.Asiento;
import Modelo.Consulta;
-import Modelo.Usuario;
+import Vista.MetodoPago;
import Vista.SalaPrincipal;
import Vista.seleccionarBoleto;
import java.awt.BorderLayout;
@@ -24,6 +24,7 @@ import javax.swing.SwingConstants;
public class ControladorBoleto implements ActionListener{
seleccionarBoleto ventana;
Consulta consulta = new Consulta();
+ Asiento asiento;
public ControladorBoleto(seleccionarBoleto ventana) {
this.ventana = ventana;
control();
@@ -94,17 +95,22 @@ public class ControladorBoleto implements ActionListener{
}else{
if(e.getSource()== ventana.getBtnSeleccionarAsiento()){
if(ventana.getLabelNumeroAsiento().getText().isEmpty()){
- JOptionPane.showMessageDialog(null, "Error. Selecciona Un Asiento Libre");
+ JOptionPane.showMessageDialog(null, "Error. Selecciona Un Asiento");
+ }else{
+ MetodoPago ventanaM = new MetodoPago(ventana.getZona(), asiento, ventana.getUser());
+ ventanaM.setLocationRelativeTo(null);
+ ventanaM.setVisible(true);
+ ventana.dispose();
}
}else{
JButton bon = (JButton) e.getSource();
- Asiento asiento = consulta.getAsiento(bon.getText(),ventana.getZona().getId());
+ asiento = consulta.getAsiento(bon.getText(),ventana.getZona().getId());
if(asiento.isEstado()){
ventana.getLabelNumeroAsiento().setText(asiento.getNombre());
ventana.getLabelCostoAsiento().setText("$"+ventana.getZona().getPrecio());
}else{
- JOptionPane.showMessageDialog(null, "Error. Selecciona Un Asiento Libre");
- ventana.getLabelNumeroAsiento().setText("");
+ JOptionPane.showMessageDialog(null, "Error. Selecciona Un Asiento Libre");
+ ventana.getLabelNumeroAsiento().setText("");
ventana.getLabelCostoAsiento().setText("");
}
}
diff --git a/src/Controlador/ControladorCP.java b/src/Controlador/ControladorCP.java
new file mode 100644
index 0000000..75cfff2
--- /dev/null
+++ b/src/Controlador/ControladorCP.java
@@ -0,0 +1,26 @@
+
+package Controlador;
+
+import Vista.ConfirmacionPago;
+import Vista.SalaPrincipal;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+/*
+ * @author Juan Ska
+*/
+public class ControladorCP implements ActionListener{
+ ConfirmacionPago ventana;
+
+ public ControladorCP(ConfirmacionPago ventana) {
+ this.ventana = ventana;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if(e.getSource()==ventana.getBtnMenu()){
+ SalaPrincipal vent = new SalaPrincipal(ventana.getUser());
+ }
+ }
+
+}
diff --git a/src/Controlador/ControladorEcenario.java b/src/Controlador/ControladorEcenario.java
index fdc16b5..8214cd9 100644
--- a/src/Controlador/ControladorEcenario.java
+++ b/src/Controlador/ControladorEcenario.java
@@ -3,7 +3,9 @@ package Controlador;
import Modelo.Asiento;
import Modelo.Consulta;
import Modelo.Sala;
+import Modelo.Usuario;
import Modelo.Zona;
+import Vista.Login;
import Vista.SalaPrincipal;
import Vista.seleccionarBoleto;
import java.awt.Dimension;
@@ -124,7 +126,14 @@ public final class ControladorEcenario implements MouseListener{
ventana.setLocationRelativeTo(null);
ventana.setVisible(true);
ventanaSala.dispose();
- }
+ }
+ if(e.getSource()==ventanaSala.getBtnCerrar()){
+ ventanaSala.setUser(new Usuario());
+ Login ventana = new Login();
+ ventana.setLocationRelativeTo(null);
+ ventana.setVisible(true);
+ ventanaSala.dispose();
+ }
}
@Override
diff --git a/src/Controlador/ControladorPago.java b/src/Controlador/ControladorPago.java
new file mode 100644
index 0000000..d0e1109
--- /dev/null
+++ b/src/Controlador/ControladorPago.java
@@ -0,0 +1,148 @@
+
+package Controlador;
+
+import Modelo.Consulta;
+import Modelo.Tarjeta;
+import Vista.ConfirmacionPago;
+import Vista.MetodoPago;
+import Vista.seleccionarBoleto;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+/*
+ * @author Juan Ska
+*/
+public class ControladorPago implements ActionListener{
+ MetodoPago ventana;
+ Consulta consulta = new Consulta();
+ public ControladorPago(MetodoPago ventana) {
+ this.ventana = ventana;
+ keyList();
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if(e.getSource()== ventana.getBtnPagar()){
+ if(ventana.getTxtCodigo().getText().isEmpty() || ventana.getTxtFechaVencimiento().getText().isEmpty() || ventana.getTxtNumeroTarjeta().getText().isEmpty() || ventana.getTxtTitular().getText().isEmpty()){
+ JOptionPane.showMessageDialog(null, "Error.Llena todos los campos.");
+ }else{
+ if(ventana.getTxtCodigo().getText().length() ==3 && ventana.getTxtFechaVencimiento().getText().length() ==5 && ventana.getTxtNumeroTarjeta().getText().length()==16){
+ Double numeroT = Double.valueOf(ventana.getTxtNumeroTarjeta().getText());
+ int numero = Integer.parseInt(ventana.getTxtCodigo().getText());
+ Tarjeta tarjeta = new Tarjeta(numeroT, ventana.getTxtFechaVencimiento().getText(),numero,ventana.getTxtTitular().getText());
+ if(consulta.comprarAsiento(ventana.getZona(),ventana.getAsiento(), ventana.getUser())){
+ JOptionPane.showMessageDialog(null, "Pago Realizado con exito!!");
+ ConfirmacionPago ven = new ConfirmacionPago(ventana.getZona(),ventana.getAsiento(),tarjeta,ventana.getUser());
+ ven.setLocationRelativeTo(null);
+ ven.setVisible(true);
+ ventana.dispose();
+ }else{
+ JOptionPane.showMessageDialog(null, "Errro!!");
+ }
+ }else{
+ JOptionPane.showMessageDialog(null, "Error. la tarjeta tiene que tener 16 dijitos, el CVV 3 y la fecha de Vencimiento es dd/aa.");
+ }
+ }
+ }
+ if(e.getSource()==ventana.getBtnRegresar()){
+ JPanel panel = new JPanel();
+ switch (ventana.getZona().getId()) {
+ case 1:
+ seleccionarBoleto ven = new seleccionarBoleto(ventana.getZona(), panel,7,5,1, ventana.getUser());
+ ven.setLocationRelativeTo(null);
+ ven.setVisible(true);
+ ventana.dispose();
+ break;
+ case 2:
+ seleccionarBoleto vent = new seleccionarBoleto(ventana.getZona(), panel,4,6,2, ventana.getUser());
+ vent.setLocationRelativeTo(null);
+ vent.setVisible(true);
+ ventana.dispose();
+ break;
+ case 3:
+ seleccionarBoleto venta = new seleccionarBoleto(ventana.getZona(), panel,2,5,3, ventana.getUser());
+ venta.setLocationRelativeTo(null);
+ venta.setVisible(true);
+ ventana.dispose();
+ break;
+ case 4:
+ seleccionarBoleto ventan = new seleccionarBoleto(ventana.getZona(), panel,7,5,4, ventana.getUser());
+ ventan.setLocationRelativeTo(null);
+ ventan.setVisible(true);
+ ventana.dispose();
+ break;
+ default:
+ }
+ }
+ }
+
+ private void keyList() {
+ ventana.getTxtNumeroTarjeta().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) {
+ if(ventana.getTxtNumeroTarjeta().getText().length()>=16){
+ e.consume();
+ }
+ int key = e.getKeyChar();
+ boolean numeros = key >= 48 && key <= 57;
+ if (!numeros){
+ e.consume();
+ }
+ }
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ }
+ });
+ ventana.getTxtFechaVencimiento().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) {
+ if(ventana.getTxtFechaVencimiento().getText().length()>=5){
+ e.consume();
+ }
+ int key = e.getKeyChar();
+ boolean numeros = key >= 48 && key <= 57;
+ if (!numeros){
+ e.consume();
+ }
+ }
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ int numero = ventana.getTxtFechaVencimiento().getText().length();
+ if(numero==2){
+ ventana.getTxtFechaVencimiento().setText(ventana.getTxtFechaVencimiento().getText()+"/");
+ }
+ }
+ });
+ ventana.getTxtCodigo().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) {
+ if(ventana.getTxtCodigo().getText().length()>=3){
+ e.consume();
+ }
+ int key = e.getKeyChar();
+ boolean numeros = key >= 48 && key <= 57;
+ if (!numeros){
+ e.consume();
+ }
+ }
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ }
+ });
+ }
+
+
+}
diff --git a/src/Images/cargando.gif b/src/Images/cargando.gif
new file mode 100644
index 0000000..78b3a13
Binary files /dev/null and b/src/Images/cargando.gif differ
diff --git a/src/Main/Main.java b/src/Main/Main.java
index 287eb95..3c1260c 100644
--- a/src/Main/Main.java
+++ b/src/Main/Main.java
@@ -1,16 +1,11 @@
package Main;
-import Modelo.Usuario;
import Vista.Login;
-import Vista.SalaPrincipal;
public class Main {
public static void main(String[] args) {
- /*Login login = new Login();
- login.setLocationRelativeTo(null);
- login.setVisible(true);*/
- SalaPrincipal login = new SalaPrincipal(new Usuario());
+ Login login = new Login();
login.setLocationRelativeTo(null);
login.setVisible(true);
}
diff --git a/src/Modelo/Consulta.java b/src/Modelo/Consulta.java
index 84150f1..1d582dc 100644
--- a/src/Modelo/Consulta.java
+++ b/src/Modelo/Consulta.java
@@ -165,5 +165,43 @@ public class Consulta {
}
return asiento;
}
+
+ public boolean comprarAsiento(Zona zona, Asiento asiento, Usuario user) {
+ boolean verificar = false;
+ try {
+ if(asignar(zona,asiento,user)){
+ PreparedStatement ps;
+ conexion = cn.conectar();
+ ps= conexion.prepareStatement("UPDATE `asiento` SET `estado`= 0 "
+ + "where id= '"+ asiento.getId()+"';");
+ ps.executeUpdate();
+ verificar = true;
+ cn.cerrarconexion();
+ }else{
+ verificar = false;
+ }
+ } catch (SQLException e) {
+ System.out.println(e.toString());
+ }
+ return verificar;
+ }
+
+ private boolean asignar(Zona zona, Asiento asiento, Usuario user) {
+ boolean verificar = false;
+ try {
+ PreparedStatement ps;
+ conexion = cn.conectar();
+ ps= conexion.prepareStatement("INSERT INTO `compra`(`usuario_id`,`asiento_id`,`zona_id`) VALUES(?,?,?);");
+ ps.setString(1, user.getNombre());
+ ps.setInt(2, asiento.getId());
+ ps.setInt(3, zona.getId());
+ ps.executeUpdate();
+ verificar = true;
+ cn.cerrarconexion();
+ } catch (SQLException e) {
+ System.out.println(e.toString());
+ }
+ return verificar;
+ }
}
diff --git a/src/Modelo/Tarjeta.java b/src/Modelo/Tarjeta.java
index 60e560e..c7be80d 100644
--- a/src/Modelo/Tarjeta.java
+++ b/src/Modelo/Tarjeta.java
@@ -10,9 +10,16 @@ package Modelo;
*/
public class Tarjeta {
- private int numeroTarjeta;
+ private double numeroTarjeta;
String diaVencimiento;
int numero;
String nombreTitular;
+
+ public Tarjeta(double numeroTarjeta, String diaVencimiento, int numero, String nombreTitular) {
+ this.numeroTarjeta = numeroTarjeta;
+ this.diaVencimiento = diaVencimiento;
+ this.numero = numero;
+ this.nombreTitular = nombreTitular;
+ }
}
diff --git a/src/Vista/ConfirmacionPago.form b/src/Vista/ConfirmacionPago.form
index 587b25c..16770c6 100644
--- a/src/Vista/ConfirmacionPago.form
+++ b/src/Vista/ConfirmacionPago.form
@@ -60,27 +60,17 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
@@ -88,7 +78,15 @@
-
+
+
+
+
+
+
+
+
+
@@ -106,13 +104,13 @@
-
-
+
+
-
+
@@ -132,12 +130,11 @@
-
+
-
@@ -147,7 +144,7 @@
-
+
@@ -169,7 +166,7 @@
-
+
diff --git a/src/Vista/ConfirmacionPago.java b/src/Vista/ConfirmacionPago.java
index 1ba4b72..c464e0e 100644
--- a/src/Vista/ConfirmacionPago.java
+++ b/src/Vista/ConfirmacionPago.java
@@ -4,8 +4,12 @@
*/
package Vista;
-import java.awt.Image;
+import Modelo.Asiento;
+import Modelo.Tarjeta;
+import Modelo.Usuario;
+import Modelo.Zona;
import javax.swing.ImageIcon;
+import javax.swing.JButton;
/**
*
@@ -17,24 +21,39 @@ public class ConfirmacionPago extends javax.swing.JFrame {
* Creates new form confirmacionPago
*/
ImageIcon imagen;
+ Zona zona;
+ Asiento asiento;
+ Tarjeta tarjeta;
+ Usuario user;
- public ConfirmacionPago() {
+ public ConfirmacionPago(Zona zona, Asiento asiento, Tarjeta tarjeta, Usuario user) {
initComponents();
- ImageIcon icon = new ImageIcon("C:\\Users\\reyes\\Documents\\ProyectoSalaConciertos\\SalaDeConciertos\\src\\Vista\\Images\\musica.png");
- Image image = icon.getImage();
- this.setIconImage(image);
this.setResizable(false);
setTitle("Confirmacion Pago");
this.setLocationRelativeTo(null);
slogan();
+ this.zona = zona;
+ this.asiento = asiento;
+ this.tarjeta = tarjeta;
+ this.user = user;
+ lbCorreo.setText(user.getCorreoelectronico());
+
}
public void slogan() {
- imagen = new ImageIcon("C:\\Users\\reyes\\Documents\\ProyectoSalaConciertos\\SalaDeConciertos\\src\\Vista\\Images\\musicas.png");
+ imagen = new ImageIcon("src\\Images\\musicas.png");
imagenLogo.setIcon(imagen);
//logoimagen.setPreferredSize(new Dimension(150, 120));
}
+ public JButton getBtnMenu() {
+ return btnMenu;
+ }
+
+ public Usuario getUser() {
+ return user;
+ }
+
/**
* 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
@@ -48,12 +67,12 @@ public class ConfirmacionPago extends javax.swing.JFrame {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
- jLabel3 = new javax.swing.JLabel();
+ lbCorreo = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
logo2 = new javax.swing.JLabel();
imagenLogo = new javax.swing.JLabel();
- menu = new javax.swing.JButton();
+ btnMenu = new javax.swing.JButton();
jLabel4.setText("jLabel4");
@@ -66,12 +85,11 @@ public class ConfirmacionPago extends javax.swing.JFrame {
jLabel2.setText("Su boleto ha sido enviado al correo");
- jLabel3.setFont(new java.awt.Font("Segoe UI", 2, 12)); // NOI18N
- jLabel3.setText("manuel23anel@gmail.com");
+ lbCorreo.setFont(new java.awt.Font("Segoe UI", 2, 12)); // NOI18N
jLabel5.setText("Para aclaraciones comunicarse con:");
- jLabel7.setText("SSporteConciertos@gmail.com");
+ jLabel7.setText("drannet9@gmail.com");
logo2.setBackground(new java.awt.Color(0, 0, 204));
logo2.setFont(new java.awt.Font("Sitka Text", 1, 18)); // NOI18N
@@ -80,9 +98,9 @@ public class ConfirmacionPago extends javax.swing.JFrame {
imagenLogo.setText(".");
- menu.setBackground(new java.awt.Color(51, 51, 51));
- menu.setForeground(new java.awt.Color(255, 255, 255));
- menu.setText("Menu Principal");
+ btnMenu.setBackground(new java.awt.Color(51, 51, 51));
+ btnMenu.setForeground(new java.awt.Color(255, 255, 255));
+ btnMenu.setText("Menu Principal");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
@@ -99,22 +117,21 @@ public class ConfirmacionPago extends javax.swing.JFrame {
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(87, 87, 87)
.addComponent(jLabel1))
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addGap(69, 69, 69)
- .addComponent(jLabel3))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(51, 51, 51)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel2)
- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel5)
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addGap(20, 20, 20)
- .addComponent(jLabel7))))))
+ .addComponent(jLabel5))))
.addContainerGap(59, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(menu)
+ .addComponent(lbCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel7)
+ .addComponent(btnMenu))
.addGap(86, 86, 86))
);
jPanel1Layout.setVerticalGroup(
@@ -129,13 +146,13 @@ public class ConfirmacionPago extends javax.swing.JFrame {
.addGap(38, 38, 38)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel3)
- .addGap(35, 35, 35)
+ .addComponent(lbCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27)
- .addComponent(menu)
+ .addComponent(btnMenu)
.addContainerGap(99, Short.MAX_VALUE))
);
@@ -160,15 +177,15 @@ public class ConfirmacionPago extends javax.swing.JFrame {
*/
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnMenu;
private javax.swing.JLabel imagenLogo;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
- private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel1;
+ private javax.swing.JLabel lbCorreo;
private javax.swing.JLabel logo2;
- private javax.swing.JButton menu;
// End of variables declaration//GEN-END:variables
}
diff --git a/src/Vista/MetodoPago.form b/src/Vista/MetodoPago.form
index 90ec4bc..42808ae 100644
--- a/src/Vista/MetodoPago.form
+++ b/src/Vista/MetodoPago.form
@@ -1,10 +1,6 @@
-
+
@@ -174,17 +188,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -225,21 +229,15 @@
-
+
-
-
-
-
+
-
+
-
-
-
-
+
-
+
@@ -247,11 +245,14 @@
-
+
-
-
-
+
+
+
+
+
+
diff --git a/src/Vista/MetodoPago.java b/src/Vista/MetodoPago.java
index 1e9d815..12ba15c 100644
--- a/src/Vista/MetodoPago.java
+++ b/src/Vista/MetodoPago.java
@@ -1,9 +1,13 @@
-/*
- * 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;
+import Controlador.ControladorPago;
+import Modelo.Asiento;
+import Modelo.Usuario;
+import Modelo.Zona;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
+
/**
*
* @author reyes
@@ -13,27 +17,126 @@ public class MetodoPago extends javax.swing.JFrame {
/**
* Creates new form metodoPago
*/
- public MetodoPago() {
+ Zona zona;
+ Usuario user;
+ Asiento asiento;
+ public MetodoPago(Zona zona, Asiento asiento, Usuario user) {
initComponents();
+ this.asiento = asiento;
+ this.zona = zona;
+ this.user =user;
+ ControladorPago controlador = new ControladorPago(this);
+ btnPagar.addActionListener(controlador);
+ btnRegresar.addActionListener(controlador);
+ mostrarLb();
}
- /**
- * 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.
- */
+ public Zona getZona() {
+ return zona;
+ }
+
+ public Usuario getUser() {
+ return user;
+ }
+
+ public Asiento getAsiento() {
+ return asiento;
+ }
+
+ public JButton getBtnPagar() {
+ return btnPagar;
+ }
+
+ public JLabel getLbCosto() {
+ return lbCosto;
+ }
+
+ public JLabel getLbNumeroAsiento() {
+ return lbNumeroAsiento;
+ }
+
+ public JLabel getLbZona() {
+ return lbZona;
+ }
+
+ public JTextField getTxtCodigo() {
+ return txtCodigo;
+ }
+
+ public JTextField getTxtFechaVencimiento() {
+ return txtFechaVencimiento;
+ }
+
+ public JTextField getTxtNumeroTarjeta() {
+ return txtNumeroTarjeta;
+ }
+
+ public JTextField getTxtTitular() {
+ return txtTitular;
+ }
+
+ public JButton getBtnRegresar() {
+ return btnRegresar;
+ }
+
+ public void setZona(Zona zona) {
+ this.zona = zona;
+ }
+
+ public void setUser(Usuario user) {
+ this.user = user;
+ }
+
+ public void setAsiento(Asiento asiento) {
+ this.asiento = asiento;
+ }
+
+ public void setBtnPagar(JButton btnPagar) {
+ this.btnPagar = btnPagar;
+ }
+
+ public void setBtnRegresar(JButton btnRegresar) {
+ this.btnRegresar = btnRegresar;
+ }
+
+ public void setLbCosto(JLabel lbCosto) {
+ this.lbCosto = lbCosto;
+ }
+
+ public void setLbNumeroAsiento(JLabel lbNumeroAsiento) {
+ this.lbNumeroAsiento = lbNumeroAsiento;
+ }
+
+ public void setLbZona(JLabel lbZona) {
+ this.lbZona = lbZona;
+ }
+
+ public void setTxtCodigo(JTextField txtCodigo) {
+ this.txtCodigo = txtCodigo;
+ }
+
+ public void setTxtFechaVencimiento(JTextField txtFechaVencimiento) {
+ this.txtFechaVencimiento = txtFechaVencimiento;
+ }
+
+ public void setTxtNumeroTarjeta(JTextField txtNumeroTarjeta) {
+ this.txtNumeroTarjeta = txtNumeroTarjeta;
+ }
+
+ public void setTxtTitular(JTextField txtTitular) {
+ this.txtTitular = txtTitular;
+ }
+
+
@SuppressWarnings("unchecked")
// //GEN-BEGIN:initComponents
private void initComponents() {
- jTextField3 = new javax.swing.JTextField();
jPanel1 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
- jButton1 = new javax.swing.JButton();
+ btnRegresar = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
- jLabel4 = new javax.swing.JLabel();
- jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
@@ -41,11 +144,14 @@ public class MetodoPago extends javax.swing.JFrame {
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
- jTextField1 = new javax.swing.JTextField();
- jTextField2 = new javax.swing.JTextField();
- jTextField4 = new javax.swing.JTextField();
- jTextField5 = new javax.swing.JTextField();
- jButton2 = new javax.swing.JButton();
+ txtNumeroTarjeta = new javax.swing.JTextField();
+ txtTitular = new javax.swing.JTextField();
+ txtFechaVencimiento = new javax.swing.JTextField();
+ txtCodigo = new javax.swing.JTextField();
+ btnPagar = new javax.swing.JButton();
+ lbZona = new javax.swing.JLabel();
+ lbNumeroAsiento = new javax.swing.JLabel();
+ lbCosto = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
@@ -54,18 +160,14 @@ public class MetodoPago extends javax.swing.JFrame {
jLabel2.setFont(new java.awt.Font("Sitka Text", 0, 18)); // NOI18N
jLabel2.setText("Sala de conciertos");
- jButton1.setBackground(new java.awt.Color(249, 249, 249));
- jButton1.setText("<- Regresar");
- jButton1.setBorderPainted(false);
+ btnRegresar.setBackground(new java.awt.Color(249, 249, 249));
+ btnRegresar.setText("<- Regresar");
+ btnRegresar.setBorderPainted(false);
jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
jLabel1.setText("Descipcion");
- jLabel3.setText("Zona X");
-
- jLabel4.setText("Breve Descripcion");
-
- jLabel5.setText("Zona de Asiento:");
+ jLabel3.setText("Zona:");
jLabel6.setText("Numero de Asiento:");
@@ -82,26 +184,9 @@ public class MetodoPago extends javax.swing.JFrame {
jLabel12.setText("Nombre del Titular");
- jTextField2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jTextField2ActionPerformed(evt);
- }
- });
-
- jTextField5.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jTextField5ActionPerformed(evt);
- }
- });
-
- jButton2.setBackground(new java.awt.Color(51, 51, 255));
- jButton2.setForeground(new java.awt.Color(255, 255, 255));
- jButton2.setText("Proceder a Pago");
- jButton2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jButton2ActionPerformed(evt);
- }
- });
+ btnPagar.setBackground(new java.awt.Color(51, 51, 255));
+ btnPagar.setForeground(new java.awt.Color(255, 255, 255));
+ btnPagar.setText("Pagar");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
@@ -115,13 +200,22 @@ public class MetodoPago extends javax.swing.JFrame {
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(37, 37, 37)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel3)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jLabel3)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(lbZona, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel1)
- .addComponent(jLabel4)
- .addComponent(jLabel5)
- .addComponent(jLabel6)
- .addComponent(jLabel7)
- .addComponent(jLabel8)))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jLabel6)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(lbNumeroAsiento, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jLabel7)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(lbCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addGap(49, 49, 49)
+ .addComponent(jLabel8))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(30, 30, 30)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -129,60 +223,62 @@ public class MetodoPago extends javax.swing.JFrame {
.addComponent(jLabel9)
.addComponent(jLabel11)
.addComponent(jLabel12)
- .addComponent(jTextField1, 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(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))))
+ .addComponent(txtNumeroTarjeta, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtTitular, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtFechaVencimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(29, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
- .addComponent(jButton1))
+ .addComponent(btnRegresar))
.addGroup(jPanel1Layout.createSequentialGroup()
- .addGap(87, 87, 87)
- .addComponent(jButton2)))
+ .addGap(107, 107, 107)
+ .addComponent(btnPagar)))
.addGap(0, 0, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(10, 10, 10)
- .addComponent(jButton1)
+ .addComponent(btnRegresar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jLabel3)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel5)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel6)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel7)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(lbZona, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGap(18, 18, 18)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel6)
+ .addComponent(lbNumeroAsiento, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(28, 28, 28)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel7)
+ .addComponent(lbCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(30, 30, 30)
.addComponent(jLabel8)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addGap(28, 28, 28)
.addComponent(jLabel9)
.addGap(9, 9, 9)
- .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtNumeroTarjeta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtFechaVencimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(7, 7, 7)
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(7, 7, 7)
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(txtTitular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
- .addComponent(jButton2)
+ .addComponent(btnPagar)
.addContainerGap(16, Short.MAX_VALUE))
);
@@ -204,39 +300,54 @@ public class MetodoPago extends javax.swing.JFrame {
pack();
}// //GEN-END:initComponents
- private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_jTextField2ActionPerformed
-
- private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField5ActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_jTextField5ActionPerformed
-
- private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_jButton2ActionPerformed
-
// Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton jButton1;
- private javax.swing.JButton jButton2;
+ private javax.swing.JButton btnPagar;
+ private javax.swing.JButton btnRegresar;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
- private javax.swing.JLabel jLabel4;
- private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
- private javax.swing.JTextField jTextField1;
- private javax.swing.JTextField jTextField2;
- private javax.swing.JTextField jTextField3;
- private javax.swing.JTextField jTextField4;
- private javax.swing.JTextField jTextField5;
+ private javax.swing.JLabel lbCosto;
+ private javax.swing.JLabel lbNumeroAsiento;
+ private javax.swing.JLabel lbZona;
+ private javax.swing.JTextField txtCodigo;
+ private javax.swing.JTextField txtFechaVencimiento;
+ private javax.swing.JTextField txtNumeroTarjeta;
+ private javax.swing.JTextField txtTitular;
// End of variables declaration//GEN-END:variables
+
+ private void mostrarLb() {
+ switch (zona.getId()) {
+ case 1:
+ lbZona.setText("Zona B");
+ lbNumeroAsiento.setText(asiento.getNombre());
+ lbCosto.setText("$"+zona.getPrecio());
+ break;
+ case 2:
+ lbZona.setText("Zona General");
+ lbNumeroAsiento.setText(asiento.getNombre());
+ lbCosto.setText("$"+zona.getPrecio());
+ break;
+ case 3:
+ lbZona.setText("Zona VIP");
+ lbNumeroAsiento.setText(asiento.getNombre());
+ lbCosto.setText("$"+zona.getPrecio());
+ break;
+ case 4:
+ lbZona.setText("Zona C");
+ lbNumeroAsiento.setText(asiento.getNombre());
+ lbCosto.setText("$"+zona.getPrecio());
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
}
diff --git a/src/Vista/SalaPrincipal.form b/src/Vista/SalaPrincipal.form
index 8ec2c27..a5d61f6 100644
--- a/src/Vista/SalaPrincipal.form
+++ b/src/Vista/SalaPrincipal.form
@@ -60,7 +60,7 @@
-
+
@@ -75,7 +75,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
@@ -175,14 +175,17 @@
+
-
-
-
+
+
+
+
+
+
-
diff --git a/src/Vista/SalaPrincipal.java b/src/Vista/SalaPrincipal.java
index 49efecf..fc5df88 100644
--- a/src/Vista/SalaPrincipal.java
+++ b/src/Vista/SalaPrincipal.java
@@ -36,16 +36,20 @@ public class SalaPrincipal extends javax.swing.JFrame {
panelC.addMouseListener(controlador);
panelGeneral.addMouseListener(controlador);
panelVip.addMouseListener(controlador);
+ btnCerrar.addMouseListener(controlador);
+ }
+
+ public void setBtnCerrar(JButton btnCerrar) {
+ this.btnCerrar = btnCerrar;
+ }
+
+ public JButton getBtnCerrar() {
+ return btnCerrar;
}
public Usuario getUser() {
return user;
}
-
- public JButton getjButton1() {
- return jButton1;
- }
-
public JPanel getPanelB() {
return panelB;
}
@@ -62,6 +66,10 @@ public class SalaPrincipal extends javax.swing.JFrame {
return panelVip;
}
+ public void setUser(Usuario user) {
+ this.user = user;
+ }
+
/**
* 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
@@ -76,7 +84,7 @@ public class SalaPrincipal extends javax.swing.JFrame {
jLabel1 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
- jButton1 = new javax.swing.JButton();
+ btnCerrar = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
@@ -102,10 +110,10 @@ public class SalaPrincipal extends javax.swing.JFrame {
jLabel3.setText("de los escenarios más destacados de la ciudad. Asegura tu lugar, con cuatro zonas distintas para elegir,");
- jButton1.setBackground(new java.awt.Color(51, 51, 51));
- jButton1.setForeground(new java.awt.Color(255, 255, 255));
- jButton1.setText("Cerrar Sesión");
- jButton1.setBorderPainted(false);
+ btnCerrar.setBackground(new java.awt.Color(51, 51, 51));
+ btnCerrar.setForeground(new java.awt.Color(255, 255, 255));
+ btnCerrar.setText("Cerrar Sesión");
+ btnCerrar.setBorderPainted(false);
jPanel2.setBackground(new java.awt.Color(255, 255, 255));
@@ -218,12 +226,14 @@ public class SalaPrincipal extends javax.swing.JFrame {
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelVip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(panelC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGroup(jPanel2Layout.createSequentialGroup()
- .addGap(53, 53, 53)
- .addComponent(jLabel7)))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
+ .addComponent(panelC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap())
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
+ .addComponent(jLabel7)
+ .addGap(39, 39, 39))))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(255, 255, 255)
.addComponent(jLabel11)
@@ -278,7 +288,7 @@ public class SalaPrincipal extends javax.swing.JFrame {
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
- .addComponent(jButton1))
+ .addComponent(btnCerrar))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(236, 236, 236)
.addComponent(jLabel2)))
@@ -288,7 +298,7 @@ public class SalaPrincipal extends javax.swing.JFrame {
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
- .addComponent(jButton1)
+ .addComponent(btnCerrar)
.addGap(9, 9, 9)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
@@ -327,7 +337,7 @@ public class SalaPrincipal extends javax.swing.JFrame {
*/
// Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton jButton1;
+ private javax.swing.JButton btnCerrar;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel13;
diff --git a/src/Vista/seleccionarBoleto.form b/src/Vista/seleccionarBoleto.form
index 3ef3679..6e44457 100644
--- a/src/Vista/seleccionarBoleto.form
+++ b/src/Vista/seleccionarBoleto.form
@@ -319,7 +319,7 @@
-
+
diff --git a/src/Vista/seleccionarBoleto.java b/src/Vista/seleccionarBoleto.java
index 926d404..5cc412b 100644
--- a/src/Vista/seleccionarBoleto.java
+++ b/src/Vista/seleccionarBoleto.java
@@ -1,24 +1,21 @@
package Vista;
import Controlador.ControladorBoleto;
-import Modelo.Usuario;
-import Modelo.Zona;
-import java.awt.BorderLayout;
-import javax.swing.JButton;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
+import Modelo.*;
+import javax.swing.*;
/**
*
* @author reyes
*/
public class seleccionarBoleto extends javax.swing.JFrame {
- private JPanel panelB;
- private int numZona;
- private int filas;
- private int columnas;
- private Zona zona;
- private Usuario user;
+ private final JPanel panelB;
+ private final int numZona;
+ private final int filas;
+ private final int columnas;
+ private final Zona zona;
+ private final Usuario user;
+
public seleccionarBoleto(Zona zona, JPanel panelB, int filas, int columnas, int numZona, Usuario user) {
this.panelB = panelB;
this.numZona = numZona;
@@ -194,7 +191,7 @@ public class seleccionarBoleto extends javax.swing.JFrame {
btnSeleccionarAsiento.setBackground(new java.awt.Color(51, 51, 51));
btnSeleccionarAsiento.setForeground(new java.awt.Color(255, 255, 255));
- btnSeleccionarAsiento.setText("Seleccionar");
+ btnSeleccionarAsiento.setText("Comprar");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);