Cambio de JFrame a JPanel de SeleccionarAsientoV

This commit is contained in:
David 2024-03-13 20:13:12 -06:00
parent 90bca1959e
commit 632f5fac0c
1 changed files with 1 additions and 10 deletions

View File

@ -1,7 +1,7 @@
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
public class SeleccionarAsientoV extends JFrame { public class SeleccionarAsientoV extends JPanel {
private JPanel pSuperior = new JPanel(new FlowLayout(FlowLayout.LEFT)); private JPanel pSuperior = new JPanel(new FlowLayout(FlowLayout.LEFT));
private JButton bRegresar = new JButton("Regresar."); private JButton bRegresar = new JButton("Regresar.");
@ -21,14 +21,12 @@ public class SeleccionarAsientoV extends JFrame {
public SeleccionarAsientoV(Asiento [][] parAsientos) throws HeadlessException { public SeleccionarAsientoV(Asiento [][] parAsientos) throws HeadlessException {
super("Seleccionar Asiento");
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
asientos = parAsientos; asientos = parAsientos;
agregarComponentes(); agregarComponentes();
crearCeldas(7,10); crearCeldas(7,10);
iniciar();
} }
public void agregarComponentes(){ public void agregarComponentes(){
@ -125,11 +123,4 @@ public class SeleccionarAsientoV extends JFrame {
lSeleccionar.setText("Asientos seleccionados: " + noAsientosSeleccionados); lSeleccionar.setText("Asientos seleccionados: " + noAsientosSeleccionados);
lTotal.setText("Total: " + total + "$"); lTotal.setText("Total: " + total + "$");
} }
public void iniciar(){
this.setBounds(100,100,700,700);
//this.setResizable(false);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
} }