-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenuPeliculas.java
More file actions
128 lines (109 loc) · 4.16 KB
/
Copy pathmenuPeliculas.java
File metadata and controls
128 lines (109 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package Interfaces;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class menuPeliculas implements ActionListener{
private JButton btnVolver, btnRegistrar, btnEditar, btnEliminar;
public JFrame frame;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
menuPeliculas window = new menuPeliculas();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public menuPeliculas() {
initialize();
}
/**
* Create the application.
* @wbp.parser.entryPoint
*/
@SuppressWarnings({ })
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 960, 640);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(960,640);
frame.getContentPane().setLayout(null);
frame.getContentPane().setBackground(new Color(72,81,84));
JLabel lblMenuInventario = new JLabel("Men\u00FA Películas");
lblMenuInventario.setForeground(Color.WHITE);
lblMenuInventario.setFont(new Font("Arial", Font.BOLD, 40));
lblMenuInventario.setBounds(337, 53, 309, 72);
frame.getContentPane().add(lblMenuInventario);
btnVolver = new JButton("Volver");
btnVolver.setForeground(Color.WHITE);
btnVolver.setFont(new Font("Arial", Font.PLAIN, 20));
btnVolver.setFocusPainted(false);
btnVolver.setBorderPainted(false);
btnVolver.setBackground(new Color(171, 0, 51));
btnVolver.setBounds(10, 562, 139, 31);
frame.getContentPane().add(btnVolver);
btnVolver.addActionListener(this);
btnRegistrar = new JButton("Registrar nueva pelicula");
btnRegistrar.setForeground(Color.WHITE);
btnRegistrar.setFont(new Font("Arial", Font.PLAIN, 24));
btnRegistrar.setFocusPainted(false);
btnRegistrar.setBorderPainted(false);
btnRegistrar.setBackground(new Color(171, 0, 51));
btnRegistrar.setBounds(307, 158, 339, 85);
frame.getContentPane().add(btnRegistrar);
btnRegistrar.addActionListener(this);
btnEditar = new JButton("Editar funciones");
btnEditar.setForeground(Color.WHITE);
btnEditar.setFont(new Font("Arial", Font.PLAIN, 24));
btnEditar.setFocusPainted(false);
btnEditar.setBorderPainted(false);
btnEditar.setBackground(new Color(171, 0, 51));
btnEditar.setBounds(307, 270, 339, 85);
frame.getContentPane().add(btnEditar);
btnEditar.addActionListener(this);
btnEliminar = new JButton("Eliminar pelicula");
btnEliminar.setForeground(Color.WHITE);
btnEliminar.setFont(new Font("Arial", Font.PLAIN, 24));
btnEliminar.setFocusPainted(false);
btnEliminar.setBorderPainted(false);
btnEliminar.setBackground(new Color(171, 0, 51));
btnEliminar.setBounds(307, 382, 339, 85);
frame.getContentPane().add(btnEliminar);
btnEliminar.addActionListener(this);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==btnRegistrar) {
registrarPelicula registrar = new registrarPelicula();
registrar.frame.setVisible(true);
}
else if(e.getSource()==btnEditar) {
menuFunciones menuFunciones = new menuFunciones();
menuFunciones.frame.setVisible(true);
frame.dispose();
}
else if(e.getSource()==btnEliminar) {
eliminarPelicula eliminar = new eliminarPelicula();
eliminar.frame.setVisible(true);
}
else if(e.getSource() == btnVolver) {
menuAdmin menu = new menuAdmin();
menu.frame.setVisible(true);
}
frame.dispose();
}
}