package interfaz;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
public class AccesoSistema extends JFrame{
private JButton btNuevoUsuario, btListarUsuarios;
public AccesoSistema (){
FlowLayout fl = new FlowLayout();
this.setTitle("Selecciona una tarea");
this.setLayout(fl);
CrearInterfaz();
Escuchadores();
}
private void CrearInterfaz(){
btNuevoUsuario = new JButton("Nuevo Usuario", new ImageIcon(getClass().getResource("/images/user.png")));
btListarUsuarios = new JButton("Listar Usuarios", new ImageIcon(getClass().getResource("/images/listar.png")));
btNuevoUsuario.setOpaque(true);
btNuevoUsuario.setBackground(null);
btNuevoUsuario.setForeground(null);
this.add(btNuevoUsuario);
this.add(btListarUsuarios);
}
private void Escuchadores(){
btNuevoUsuario.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
//LLAMAMOS VENTANA PARA NUEVO USUARIO
}
});
btListarUsuarios.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//LLAMAMOS A VENTANA PARA LISTAR USUARIOS
}
});
}
}