mezontleTeam/ventana2.java

47 lines
1.5 KiB
Java

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ventana2 {
JPanel panelV2;
private JButton comprarBoletosButton;
private JButton carteleraButton;
private JButton cerrarSesiónButton;
private JButton button1;
private JButton button2;
private JButton button3;
private JButton button4;
private JButton button5;
private JButton button6;
private JScrollBar scrollBar1;
public ventana2 (){
cerrarSesiónButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(panelV2);
frame.dispose();
JFrame registerFrame = new JFrame("Seleccionar asiento");
registerFrame.setContentPane(new SeleccionarAsientoV());
registerFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Dimension pantalla = Toolkit.getDefaultToolkit().getScreenSize();
int height = pantalla.height;
int width = pantalla.width;
frame.setSize(width/2, height/2);
frame.setLocationRelativeTo(null);
registerFrame.pack();
registerFrame.setVisible(true);
}
});
comprarBoletosButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
});
}
}