Modificacion de Interfaz

This commit is contained in:
Frantatita 2024-03-19 22:20:00 -06:00
parent 40a708ec48
commit 3d812169f8
8 changed files with 92 additions and 72 deletions

View File

@ -1,7 +1,11 @@
create database cocina;
drop database cocina;
CREATE USER 'UserRemoto' @'localhost' IDENTIFIED BY 'password123';
DROP USER 'UserRemoto'@'localhost';
GRANT ALL PRIVILEGES ON cocina TO 'UserRemoto' @'localhost';
FLUSH PRIVILEGES;
use cocina;
drop table usuarios;
@ -56,6 +60,9 @@ INSERT INTO `zona`(`precio`)VALUES
INSERT INTO `usuarios`(`nombreUsuario`, `correo`, `password`, `tipo`) VALUES(?,?,?,?);
select * from zona;
select * from asiento;
select * from compra;
INSERT INTO `asiento`(`nombre_asiento`, `estado`, `zona_id`)
VALUES

View File

@ -56,8 +56,8 @@ javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=21
javac.target=21
javac.source=20
javac.target=20
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}

View File

@ -1,6 +1,7 @@
package Main;
import Vista.Login;
import Vista.SalaPrincipal;
public class Main {

View File

@ -10,6 +10,7 @@ import Modelo.EnviarCorreo;
import Modelo.Tarjeta;
import Modelo.Usuario;
import Modelo.Zona;
import java.awt.Image;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.mail.MessagingException;
@ -36,6 +37,8 @@ public class ConfirmacionPago extends javax.swing.JFrame {
this.setResizable(false);
setTitle("Confirmacion Pago");
this.setLocationRelativeTo(null);
ImageIcon icon = new ImageIcon("src\\Images\\music.png");
Image image = icon.getImage();
slogan();
this.zona = zona;
this.asiento = asiento;

View File

@ -85,36 +85,39 @@
<EmptySpace min="-2" pref="168" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
<Component id="imagenlogo" min="-2" pref="76" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="120" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="197" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="105" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace min="0" pref="22" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
<Component id="imagenlogo" min="-2" pref="77" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="txtNombreUsuario" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
@ -125,7 +128,7 @@
<Component id="btnLogin" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="btnRegistrarse" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="34" max="32767" attributes="0"/>
<EmptySpace pref="50" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
@ -214,10 +217,7 @@
<Property name="text" type="java.lang.String" value="Contrase&#xf1;a:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel8">
<Properties>
<Property name="text" type="java.lang.String" value="Icono"/>
</Properties>
<Component class="javax.swing.JLabel" name="imagenlogo">
</Component>
<Component class="javax.swing.JButton" name="btnRegistrarse">
<Properties>

View File

@ -5,6 +5,8 @@
package Vista;
import Controlador.ControladorLogin;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
@ -18,15 +20,32 @@ public class Login extends javax.swing.JFrame {
/**
* Creates new form login
*/
ImageIcon imagen;
ControladorLogin contorlador = new ControladorLogin(this);
public Login() {
initComponents();
setTitle("Inicio Sesion");
setResizable(false);
ImageIcon icon = new ImageIcon("src//Images//musica.png");
Image image = icon.getImage();
this.setIconImage(image);
slogan();
btnLogin.addActionListener(contorlador);
btnRegistrarse.addActionListener(contorlador);
}
public void slogan() {
ImageIcon imagenIcon = new ImageIcon("src\\Images\\music.png");
Image imagenOriginal = imagenIcon.getImage();
Image imagenEscalada = imagenOriginal.getScaledInstance(60,60, Image.SCALE_SMOOTH); // Ajusta el tamaño a 300x300 píxeles
ImageIcon imagenFinal = new ImageIcon(imagenEscalada);
imagenlogo.setIcon(imagenFinal);
}
public JButton getBtnLogin() {
return btnLogin;
}
@ -62,7 +81,7 @@ public class Login extends javax.swing.JFrame {
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
imagenlogo = new javax.swing.JLabel();
btnRegistrarse = new javax.swing.JButton();
txtContraseñaLogin = new javax.swing.JPasswordField();
@ -100,8 +119,6 @@ public class Login extends javax.swing.JFrame {
jLabel7.setText("Contraseña:");
jLabel8.setText("Icono");
btnRegistrarse.setBackground(new java.awt.Color(51, 51, 51));
btnRegistrarse.setForeground(new java.awt.Color(255, 255, 255));
btnRegistrarse.setText("Registrarse");
@ -134,30 +151,31 @@ public class Login extends javax.swing.JFrame {
.addGap(22, 22, 22)))
.addGap(168, 168, 168))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(imagenlogo, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(120, 120, 120)
.addGap(22, 22, 22)
.addComponent(jLabel2))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(197, 197, 197)
.addGap(105, 105, 105)
.addComponent(jLabel1)))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(jLabel8)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(0, 22, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(14, 14, 14)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel6)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(20, 20, 20)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel6))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGap(14, 14, 14)
.addComponent(imagenlogo, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(txtNombreUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
@ -168,7 +186,7 @@ public class Login extends javax.swing.JFrame {
.addComponent(btnLogin)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btnRegistrarse)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(jLabel4)
@ -204,6 +222,7 @@ public class Login extends javax.swing.JFrame {
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnLogin;
private javax.swing.JButton btnRegistrarse;
private javax.swing.JLabel imagenlogo;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
@ -211,7 +230,6 @@ public class Login extends javax.swing.JFrame {
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JPanel jPanel1;
private javax.swing.JPasswordField txtContraseñaLogin;
private javax.swing.JTextField txtNombreUsuario;

View File

@ -51,7 +51,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="66" max="-2" attributes="0"/>
<Component id="btnRegistrar" min="-2" pref="147" max="-2" attributes="0"/>
@ -59,15 +59,10 @@
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
<Component id="logoimagen" min="-2" pref="68" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="logo" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<Component id="logo" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
@ -83,7 +78,7 @@
</Group>
</Group>
</Group>
<EmptySpace pref="24" max="32767" attributes="0"/>
<EmptySpace pref="18" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -92,15 +87,14 @@
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="72" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
<Component id="logo" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="logoimagen" alignment="3" min="-2" pref="70" max="-2" attributes="0"/>
<Component id="logo" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="logoimagen" min="-2" pref="70" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>

View File

@ -25,7 +25,7 @@ public class Registro extends javax.swing.JFrame {
public Registro() {
setTitle("Registro");
ImageIcon icon = new ImageIcon("src\\Images\\music.png");
ImageIcon icon = new ImageIcon("src\\Images\\musica.png");
Image image = icon.getImage();
this.setIconImage(image);
this.setResizable(false);
@ -125,20 +125,17 @@ public class Registro extends javax.swing.JFrame {
panelRegistroLayout.setHorizontalGroup(
panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRegistroLayout.createSequentialGroup()
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRegistroLayout.createSequentialGroup()
.addGap(66, 66, 66)
.addComponent(btnRegistrar, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelRegistroLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(logoimagen, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRegistroLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelRegistroLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(logo))))
.addComponent(jLabel3)
.addComponent(logo)))
.addGroup(panelRegistroLayout.createSequentialGroup()
.addGap(30, 30, 30)
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
@ -149,20 +146,20 @@ public class Registro extends javax.swing.JFrame {
.addComponent(txtCorreoRegistro)
.addComponent(txtPassword)
.addComponent(labelName, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(24, Short.MAX_VALUE))
.addContainerGap(18, Short.MAX_VALUE))
);
panelRegistroLayout.setVerticalGroup(
panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRegistroLayout.createSequentialGroup()
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRegistroLayout.createSequentialGroup()
.addGap(72, 72, 72)
.addGap(22, 22, 22)
.addComponent(logo)
.addGap(27, 27, 27)
.addComponent(jLabel3))
.addGroup(panelRegistroLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panelRegistroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(logoimagen, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(logo))))
.addComponent(logoimagen, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(29, 29, 29)
.addComponent(jLabel7)
.addGap(18, 18, 18)