avance 11
This commit is contained in:
parent
300bd747cc
commit
ae33689c77
|
@ -7,12 +7,14 @@ import java.awt.event.ActionListener;
|
||||||
|
|
||||||
class BotonConImagen extends JButton {
|
class BotonConImagen extends JButton {
|
||||||
int cambio = 0;
|
int cambio = 0;
|
||||||
int precio = 150;
|
int precio;
|
||||||
private String id; // Campo id privado
|
private String id; // Campo id privado
|
||||||
private boolean isAmarillo = false; // Estado para indicar si está utilizando el color amarillo
|
private boolean isAmarillo = false; // Estado para indicar si está utilizando el color amarillo
|
||||||
|
int precio2;
|
||||||
|
|
||||||
|
|
||||||
public BotonConImagen(String id) {
|
public BotonConImagen(String id, String zona) {
|
||||||
|
precio2 = precioPorZona(zona);
|
||||||
this.id = id;
|
this.id = id;
|
||||||
ImageIcon icono = new ImageIcon("C:/Users/mario/OneDrive/Documentos/NetBeansProjects/Imagene/src/asdasdasdasd.png");
|
ImageIcon icono = new ImageIcon("C:/Users/mario/OneDrive/Documentos/NetBeansProjects/Imagene/src/asdasdasdasd.png");
|
||||||
setIcon(icono); // Establece la imagen en el botón
|
setIcon(icono); // Establece la imagen en el botón
|
||||||
|
@ -43,7 +45,36 @@ class BotonConImagen extends JButton {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int precioPorZona(String zona){
|
||||||
|
|
||||||
|
if(zona == "asientoA1" || zona == "asientoA2" || zona == "asientoA3"){
|
||||||
|
return 3500;
|
||||||
|
}else{
|
||||||
|
if(zona == "asientoB1" || zona == "asientoB2" || zona == "asientoB3" || zona == "asientoB4"){
|
||||||
|
return 3000;
|
||||||
|
}else{
|
||||||
|
if(zona == "asientoC1" || zona == "asientoC2" || zona == "asientoC3" || zona == "asientoC4"){
|
||||||
|
return 2500;
|
||||||
|
}else{
|
||||||
|
if(zona == "asientoD1" || zona == "asientoD2" || zona == "asientoD3" || zona == "asientoD4"){
|
||||||
|
return 1200;
|
||||||
|
}else{
|
||||||
|
if(zona == "asientoE1" || zona == "asientoE2" || zona == "asientoE3" || zona == "asientoE4" || zona == "asientoE5"){
|
||||||
|
return 9000;
|
||||||
|
}else{
|
||||||
|
if(zona == "asientoF1" || zona == "asientoF2" || zona == "asientoF3" || zona == "asientoF4" || zona == "asientoF5"){
|
||||||
|
return 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Métodos getter y setter para el campo id
|
// Métodos getter y setter para el campo id
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -54,6 +85,7 @@ class BotonConImagen extends JButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPrecio() {
|
public int getPrecio() {
|
||||||
|
precio = precio2;
|
||||||
return precio;
|
return precio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="Principal" min="-2" max="-2" attributes="0"/>
|
<Component id="Principal" min="-2" pref="870" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
|
@ -48,11 +48,12 @@
|
||||||
<Component id="panelFilas" min="-2" max="-2" attributes="0"/>
|
<Component id="panelFilas" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="panelSeleccion" max="32767" attributes="0"/>
|
<Component id="panelSeleccion" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="135" max="-2" attributes="0"/>
|
||||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="barraSuperior" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="barraSuperior" alignment="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
|
@ -62,7 +63,6 @@
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="panelSeleccion" max="32767" attributes="0"/>
|
<Component id="panelSeleccion" max="32767" attributes="0"/>
|
||||||
<Component id="jPanel1" max="32767" attributes="0"/>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="panelFilas" max="32767" attributes="0"/>
|
<Component id="panelFilas" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
@ -79,6 +79,19 @@
|
||||||
<Property name="useNullLayout" type="boolean" value="false"/>
|
<Property name="useNullLayout" type="boolean" value="false"/>
|
||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JButton" name="jButton1">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="volver"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="730" y="30" width="130" height="60"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="imgConcierto">
|
<Component class="javax.swing.JLabel" name="imgConcierto">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" value="ImgConcierto"/>
|
<Property name="text" type="java.lang.String" value="ImgConcierto"/>
|
||||||
|
@ -122,20 +135,7 @@
|
||||||
<Component class="javax.swing.JLabel" name="fondoportada">
|
<Component class="javax.swing.JLabel" name="fondoportada">
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
<AbsoluteConstraints x="0" y="0" width="1260" height="130"/>
|
<AbsoluteConstraints x="0" y="0" width="970" height="130"/>
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="jButton1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="volver"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
|
||||||
<AbsoluteConstraints x="1032" y="30" width="130" height="60"/>
|
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
|
@ -1567,7 +1567,7 @@
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="LabelNums" min="-2" pref="748" max="-2" attributes="0"/>
|
<Component id="LabelNums" min="-2" pref="748" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="21" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
|
@ -1594,98 +1594,6 @@
|
||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
|
||||||
<Color blue="cc" green="cc" red="cc" type="rgb"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="jPanel4" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel5" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jScrollPane1" min="-2" pref="553" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jPanel4" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="asientosSelecc">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="321" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="551" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="75" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="panelFilas">
|
<Container class="javax.swing.JPanel" name="panelFilas">
|
||||||
<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">
|
||||||
|
@ -1700,11 +1608,11 @@
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="LabelA" max="32767" attributes="0"/>
|
<Component id="LabelA" max="32767" attributes="0"/>
|
||||||
<Component id="LabelB" alignment="1" pref="30" max="32767" attributes="0"/>
|
<Component id="LabelB" alignment="1" max="32767" attributes="0"/>
|
||||||
<Component id="LabelC" alignment="0" pref="30" max="32767" attributes="0"/>
|
<Component id="LabelC" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="LabelD" alignment="0" pref="30" max="32767" attributes="0"/>
|
<Component id="LabelD" alignment="0" pref="30" max="32767" attributes="0"/>
|
||||||
<Component id="LabelE" alignment="0" pref="30" max="32767" attributes="0"/>
|
<Component id="LabelE" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="LabelF" alignment="0" pref="30" max="32767" attributes="0"/>
|
<Component id="LabelF" alignment="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
|
@ -97,11 +97,11 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
|
|
||||||
Principal = new javax.swing.JPanel();
|
Principal = new javax.swing.JPanel();
|
||||||
barraSuperior = new javax.swing.JPanel();
|
barraSuperior = new javax.swing.JPanel();
|
||||||
|
jButton1 = new javax.swing.JButton();
|
||||||
imgConcierto = new javax.swing.JLabel();
|
imgConcierto = new javax.swing.JLabel();
|
||||||
banda = new javax.swing.JLabel();
|
banda = new javax.swing.JLabel();
|
||||||
jLabel12 = new javax.swing.JLabel();
|
jLabel12 = new javax.swing.JLabel();
|
||||||
fondoportada = new javax.swing.JLabel();
|
fondoportada = new javax.swing.JLabel();
|
||||||
jButton1 = new javax.swing.JButton();
|
|
||||||
panelSeleccion = new javax.swing.JPanel();
|
panelSeleccion = new javax.swing.JPanel();
|
||||||
panelMapaAsientos = new javax.swing.JPanel();
|
panelMapaAsientos = new javax.swing.JPanel();
|
||||||
panelMapaSala = new javax.swing.JPanel();
|
panelMapaSala = new javax.swing.JPanel();
|
||||||
|
@ -160,11 +160,6 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
jLabel1 = new javax.swing.JLabel();
|
jLabel1 = new javax.swing.JLabel();
|
||||||
panelColumnas = new javax.swing.JPanel();
|
panelColumnas = new javax.swing.JPanel();
|
||||||
LabelNums = new javax.swing.JLabel();
|
LabelNums = new javax.swing.JLabel();
|
||||||
jPanel1 = new javax.swing.JPanel();
|
|
||||||
jScrollPane1 = new javax.swing.JScrollPane();
|
|
||||||
asientosSelecc = new javax.swing.JPanel();
|
|
||||||
jPanel4 = new javax.swing.JPanel();
|
|
||||||
jPanel5 = new javax.swing.JPanel();
|
|
||||||
panelFilas = new javax.swing.JPanel();
|
panelFilas = new javax.swing.JPanel();
|
||||||
LabelA = new javax.swing.JLabel();
|
LabelA = new javax.swing.JLabel();
|
||||||
LabelB = new javax.swing.JLabel();
|
LabelB = new javax.swing.JLabel();
|
||||||
|
@ -179,6 +174,14 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
|
|
||||||
barraSuperior.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
|
barraSuperior.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
|
||||||
|
|
||||||
|
jButton1.setText("volver");
|
||||||
|
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
jButton1ActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
barraSuperior.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 30, 130, 60));
|
||||||
|
|
||||||
imgConcierto.setText("ImgConcierto");
|
imgConcierto.setText("ImgConcierto");
|
||||||
barraSuperior.add(imgConcierto, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 190, 110));
|
barraSuperior.add(imgConcierto, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 190, 110));
|
||||||
|
|
||||||
|
@ -189,15 +192,7 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
jLabel12.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
|
jLabel12.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
|
||||||
jLabel12.setForeground(new java.awt.Color(255, 255, 255));
|
jLabel12.setForeground(new java.awt.Color(255, 255, 255));
|
||||||
barraSuperior.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 70, 300, 30));
|
barraSuperior.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 70, 300, 30));
|
||||||
barraSuperior.add(fondoportada, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1260, 130));
|
barraSuperior.add(fondoportada, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 970, 130));
|
||||||
|
|
||||||
jButton1.setText("volver");
|
|
||||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
jButton1ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
barraSuperior.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1032, 30, 130, 60));
|
|
||||||
|
|
||||||
panelSeleccion.setBackground(new java.awt.Color(255, 255, 255));
|
panelSeleccion.setBackground(new java.awt.Color(255, 255, 255));
|
||||||
|
|
||||||
|
@ -1230,7 +1225,7 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
.addGroup(panelColumnasLayout.createSequentialGroup()
|
.addGroup(panelColumnasLayout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(LabelNums, javax.swing.GroupLayout.PREFERRED_SIZE, 748, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(LabelNums, javax.swing.GroupLayout.PREFERRED_SIZE, 748, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(21, Short.MAX_VALUE))
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
panelColumnasLayout.setVerticalGroup(
|
panelColumnasLayout.setVerticalGroup(
|
||||||
panelColumnasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
panelColumnasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
@ -1259,69 +1254,6 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
|
|
||||||
jPanel1.setBackground(new java.awt.Color(204, 204, 204));
|
|
||||||
|
|
||||||
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout asientosSeleccLayout = new javax.swing.GroupLayout(asientosSelecc);
|
|
||||||
asientosSelecc.setLayout(asientosSeleccLayout);
|
|
||||||
asientosSeleccLayout.setHorizontalGroup(
|
|
||||||
asientosSeleccLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 321, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
asientosSeleccLayout.setVerticalGroup(
|
|
||||||
asientosSeleccLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 551, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
|
|
||||||
jScrollPane1.setViewportView(asientosSelecc);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
|
|
||||||
jPanel4.setLayout(jPanel4Layout);
|
|
||||||
jPanel4Layout.setHorizontalGroup(
|
|
||||||
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 0, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
jPanel4Layout.setVerticalGroup(
|
|
||||||
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 0, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
|
||||||
jPanel5.setLayout(jPanel5Layout);
|
|
||||||
jPanel5Layout.setHorizontalGroup(
|
|
||||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 0, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
jPanel5Layout.setVerticalGroup(
|
|
||||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 75, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
|
||||||
jPanel1.setLayout(jPanel1Layout);
|
|
||||||
jPanel1Layout.setHorizontalGroup(
|
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jScrollPane1))
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
jPanel1Layout.setVerticalGroup(
|
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 553, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
|
|
||||||
panelFilas.setBackground(new java.awt.Color(255, 255, 255));
|
panelFilas.setBackground(new java.awt.Color(255, 255, 255));
|
||||||
|
|
||||||
LabelA.setFont(new java.awt.Font("Segoe UI", 1, 36)); // NOI18N
|
LabelA.setFont(new java.awt.Font("Segoe UI", 1, 36)); // NOI18N
|
||||||
|
@ -1350,11 +1282,11 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(panelFilasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(panelFilasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(LabelA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(LabelA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(LabelB, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
|
.addComponent(LabelB, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(LabelC, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
|
.addComponent(LabelC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(LabelD, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
|
.addComponent(LabelD, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
|
||||||
.addComponent(LabelE, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
|
.addComponent(LabelE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(LabelF, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))
|
.addComponent(LabelF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
panelFilasLayout.setVerticalGroup(
|
panelFilasLayout.setVerticalGroup(
|
||||||
|
@ -1384,10 +1316,10 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
.addComponent(panelFilas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(panelFilas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(panelSeleccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(panelSeleccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addGap(135, 135, 135))
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addGroup(PrincipalLayout.createSequentialGroup()
|
||||||
.addContainerGap())
|
.addComponent(barraSuperior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(barraSuperior, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
.addGap(0, 0, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
PrincipalLayout.setVerticalGroup(
|
PrincipalLayout.setVerticalGroup(
|
||||||
PrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
PrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
@ -1396,7 +1328,6 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addGroup(PrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(PrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(panelSeleccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(panelSeleccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addGroup(PrincipalLayout.createSequentialGroup()
|
.addGroup(PrincipalLayout.createSequentialGroup()
|
||||||
.addComponent(panelFilas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(panelFilas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addContainerGap())))
|
.addContainerGap())))
|
||||||
|
@ -1406,7 +1337,7 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(Principal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(Principal, javax.swing.GroupLayout.PREFERRED_SIZE, 870, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
@ -2138,7 +2069,6 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
private javax.swing.JLabel LabelF;
|
private javax.swing.JLabel LabelF;
|
||||||
private javax.swing.JLabel LabelNums;
|
private javax.swing.JLabel LabelNums;
|
||||||
private javax.swing.JPanel Principal;
|
private javax.swing.JPanel Principal;
|
||||||
private javax.swing.JPanel asientosSelecc;
|
|
||||||
private javax.swing.JLabel banda;
|
private javax.swing.JLabel banda;
|
||||||
private javax.swing.JPanel barraSuperior;
|
private javax.swing.JPanel barraSuperior;
|
||||||
private javax.swing.JLabel fondoportada;
|
private javax.swing.JLabel fondoportada;
|
||||||
|
@ -2171,12 +2101,8 @@ public class VentanaConciertos extends javax.swing.JFrame {
|
||||||
private javax.swing.JLabel jLabel7;
|
private javax.swing.JLabel jLabel7;
|
||||||
private javax.swing.JLabel jLabel8;
|
private javax.swing.JLabel jLabel8;
|
||||||
private javax.swing.JLabel jLabel9;
|
private javax.swing.JLabel jLabel9;
|
||||||
private javax.swing.JPanel jPanel1;
|
|
||||||
private javax.swing.JPanel jPanel2;
|
private javax.swing.JPanel jPanel2;
|
||||||
private javax.swing.JPanel jPanel3;
|
private javax.swing.JPanel jPanel3;
|
||||||
private javax.swing.JPanel jPanel4;
|
|
||||||
private javax.swing.JPanel jPanel5;
|
|
||||||
private javax.swing.JScrollPane jScrollPane1;
|
|
||||||
private javax.swing.JPanel panelColumnas;
|
private javax.swing.JPanel panelColumnas;
|
||||||
private javax.swing.JPanel panelFilas;
|
private javax.swing.JPanel panelFilas;
|
||||||
private javax.swing.JPanel panelMapaAsientos;
|
private javax.swing.JPanel panelMapaAsientos;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class panelAsientos extends JPanel {
|
||||||
panelCentral.add(sala);
|
panelCentral.add(sala);
|
||||||
|
|
||||||
precioLabel = new JLabel("Precio total: $0");
|
precioLabel = new JLabel("Precio total: $0");
|
||||||
precioLabel.setBounds(0, 70, 100, 30);
|
precioLabel.setBounds(0, 70, 180, 30);
|
||||||
panelCentral.add(precioLabel);
|
panelCentral.add(precioLabel);
|
||||||
|
|
||||||
int posX = 30;
|
int posX = 30;
|
||||||
|
@ -113,7 +113,7 @@ public class panelAsientos extends JPanel {
|
||||||
String id = rs.getString("id");
|
String id = rs.getString("id");
|
||||||
String estado = rs.getString("estado");
|
String estado = rs.getString("estado");
|
||||||
|
|
||||||
BotonConImagen boton = new BotonConImagen(id);
|
BotonConImagen boton = new BotonConImagen(id, zona);
|
||||||
boton.setBounds(posX, posY, 70, 70);
|
boton.setBounds(posX, posY, 70, 70);
|
||||||
panelCentral.add(boton);
|
panelCentral.add(boton);
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ public class panelAsientos extends JPanel {
|
||||||
int numeroColumna = columna + 1;
|
int numeroColumna = columna + 1;
|
||||||
String idAsiento = String.valueOf(letraFila) + numeroColumna;
|
String idAsiento = String.valueOf(letraFila) + numeroColumna;
|
||||||
|
|
||||||
BotonConImagen boton = new BotonConImagen(idAsiento);
|
BotonConImagen boton = new BotonConImagen(idAsiento,zona);
|
||||||
boton.setBounds(posX, posY, 70, 70);
|
boton.setBounds(posX, posY, 70, 70);
|
||||||
panelCentral.add(boton);
|
panelCentral.add(boton);
|
||||||
|
|
||||||
|
@ -204,14 +204,6 @@ public class panelAsientos extends JPanel {
|
||||||
add(panelCentral, BorderLayout.CENTER);
|
add(panelCentral, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
|
||||||
// Crear panelSeleccionA y establecer su color
|
|
||||||
JPanel panelSeleccionA = new JPanel();
|
|
||||||
panelSeleccionA.setBackground(Color.RED);
|
|
||||||
|
|
||||||
// Agregar panelSeleccionA al este de panelAsientos
|
|
||||||
add(panelSeleccionA, BorderLayout.EAST);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue