mirror of
https://gitlab.com/tutorial-java-rafa-munoz/tutorial-java-2024-25/tutorialjava2024-25.git
synced 2025-11-09 18:03:09 +01:00
66 lines
1.8 KiB
Java
66 lines
1.8 KiB
Java
package tutorialJava.examenes.examen20250509.vista;
|
|
|
|
import java.awt.EventQueue;
|
|
|
|
import javax.swing.JFrame;
|
|
import javax.swing.JPanel;
|
|
import javax.swing.border.EmptyBorder;
|
|
import java.awt.BorderLayout;
|
|
import javax.swing.JLabel;
|
|
import java.awt.Font;
|
|
import javax.swing.SwingConstants;
|
|
import javax.swing.JTabbedPane;
|
|
|
|
public class VentanaPrincipal extends JFrame {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
private JPanel contentPane;
|
|
|
|
/**
|
|
* Launch the application.
|
|
*/
|
|
public static void main(String[] args) {
|
|
EventQueue.invokeLater(new Runnable() {
|
|
public void run() {
|
|
try {
|
|
VentanaPrincipal frame = new VentanaPrincipal();
|
|
frame.setVisible(true);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Create the frame.
|
|
*/
|
|
public VentanaPrincipal() {
|
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
setBounds(100, 100, 450, 300);
|
|
contentPane = new JPanel();
|
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
|
|
setContentPane(contentPane);
|
|
contentPane.setLayout(new BorderLayout(0, 0));
|
|
|
|
JLabel lblNewLabel = new JLabel("Gestión de conciertos");
|
|
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
|
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
|
|
contentPane.add(lblNewLabel, BorderLayout.NORTH);
|
|
|
|
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
contentPane.add(tabbedPane, BorderLayout.CENTER);
|
|
|
|
PanelGestionConciertos panel1 = new PanelGestionConciertos();
|
|
tabbedPane.addTab("Gestión de conciertos", null, panel1, null);
|
|
|
|
PanelFiltradoConciertos panel2 = new PanelFiltradoConciertos();
|
|
tabbedPane.addTab("Filtrado de conciertos", null, panel2, null);
|
|
|
|
PanelEstadisticas panel3 = new PanelEstadisticas();
|
|
tabbedPane.addTab("Estadísticas", null, panel3, null);
|
|
}
|
|
|
|
}
|