-
Notifications
You must be signed in to change notification settings - Fork 0
/
OPadministrador.java
107 lines (99 loc) · 3.09 KB
/
OPadministrador.java
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
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
@SuppressWarnings("serial")
public class OPadministrador extends JFrame implements ActionListener
{
JLabel panel;
JButton Balumnos, Bbase, Bregistros;
ImageIcon imgFondo = new ImageIcon(getClass().getResource("/imagenes/1280720_OPadministrador.png"));
public OPadministrador()
{
setLayout(null);
//fondo panel----------------------------------------------------------------------------------------
panel = new JLabel();
panel.setIcon(new ImageIcon(imgFondo.getImage().getScaledInstance(1040, 585, Image.SCALE_SMOOTH)));
panel.setBounds(0, 0, 1040, 585);
add(panel);
//botones desde clase todo---------------------------------------------------------------------------
todo.claseBclub();
todo.Bclub.addActionListener(this);
panel.add(todo.Bclub);
todo.claseBinicio();
todo.Binicio.addActionListener(this);
panel.add(todo.Binicio);
//Botones-------------------------------------------------------------------------------------
Balumnos = new JButton(""); //ALUMNOS
Balumnos.setBounds(165, 180, 165, 165);
Balumnos.setContentAreaFilled(false);
Balumnos.setVisible(true);
Balumnos.setBorder(null);
Balumnos.addActionListener(this);
panel.add(Balumnos);
Bbase = new JButton(""); //BASE DE DATOS
Bbase.setBounds(435, 180, 165, 165);
Bbase.setContentAreaFilled(false);
Bbase.setVisible(true);
Bbase.setBorder(null);
Bbase.addActionListener(this);
panel.add(Bbase);
Bregistros = new JButton(""); //REGISTROS
Bregistros.setBounds(705, 180, 165, 165);
Bregistros.setContentAreaFilled(false);
Bregistros.setVisible(true);
Bregistros.setBorder(null);
Bregistros.addActionListener(this);
panel.add(Bregistros);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource() == Balumnos)
{
alumnosOPadministrador clase = new alumnosOPadministrador();
clase.setBounds(0,0,1040, 585);
clase.setUndecorated(true);
clase.setVisible(true);
clase.setResizable(false);
clase.setLocationRelativeTo(null);
dispose();
}
if(e.getSource() == Bbase)
{
baseOPadministrador clase = new baseOPadministrador();
clase.setBounds(0,0,1040, 585);
clase.setUndecorated(true);
clase.setVisible(true);
clase.setResizable(false);
clase.setLocationRelativeTo(null);
dispose();
}
if(e.getSource() == Bregistros)
{
/*registrosOPadministrador clase = new registrosOPadministrador();
clase.setBounds(0,0,1040, 585);
clase.setUndecorated(true);
clase.setVisible(true);
clase.setResizable(false);
clase.setLocationRelativeTo(null);
dispose();*/
}
if(e.getSource() == todo.Binicio)
{
todo.claseFuncionBinicio();
dispose();
}
if(e.getSource() == todo.Bclub)
{
todo.conclusion();
}
}
public static void main(String[] args)
{
OPadministrador clase = new OPadministrador();
clase.setBounds(0,0,1040, 585);
clase.setUndecorated(true);
clase.setVisible(true);
clase.setResizable(false);
clase.setLocationRelativeTo(null);
}
}