This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package interfazGrafica;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.Color;
|
||||
|
||||
public class PanelHome extends JPanel {
|
||||
|
||||
public PanelHome() {
|
||||
setLayout(new BorderLayout(10, 10));
|
||||
|
||||
JLabel titulo = new JLabel("Bienvenido", JLabel.CENTER);
|
||||
titulo.setFont(new Font("Arial", Font.BOLD, 24));
|
||||
|
||||
Font btnFont = new Font("Arial", Font.BOLD, 18);
|
||||
|
||||
JButton btnIngreso = new JButton("Registrar Ingreso");
|
||||
JButton btnSalida = new JButton("Registrar Salida");
|
||||
JButton btnEspDisp = new JButton("Espacios disponibles");
|
||||
JButton btnReportes = new JButton("Reportes del dia");
|
||||
JButton btnSalir = new JButton("Salir");
|
||||
|
||||
btnIngreso.setFont(btnFont);
|
||||
btnSalida.setFont(btnFont);
|
||||
btnEspDisp.setFont(btnFont);
|
||||
btnReportes.setFont(btnFont);
|
||||
btnSalir.setFont(btnFont);
|
||||
|
||||
JPanel gridPanel = new JPanel(new GridLayout(2,2,5,5));
|
||||
gridPanel.setPreferredSize(new Dimension(320,320));
|
||||
gridPanel.add(btnIngreso);
|
||||
gridPanel.add(btnSalida);
|
||||
gridPanel.add(btnEspDisp);
|
||||
gridPanel.add(btnReportes);
|
||||
|
||||
JPanel southPanel = new JPanel();
|
||||
southPanel.add(btnSalir);
|
||||
|
||||
add(titulo, BorderLayout.NORTH);
|
||||
add(gridPanel, BorderLayout.CENTER);
|
||||
add(southPanel, BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user