Untitled
unknown
plain_text
2 years ago
8.8 kB
10
Indexable
package sistemaCocinas;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.SwingConstants;
import java.awt.Color;
import javax.swing.JLayeredPane;
import javax.swing.JDesktopPane;
import javax.swing.JScrollBar;
import javax.swing.JMenuBar;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JToggleButton;
import javax.swing.JRadioButton;
import javax.swing.JButton;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.ImageIcon;
import java.awt.Insets;
public class menu extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
private JPanel contentPane;
private JLabel lblNewLabel_1;
private JLabel lblNewLabel_2;
private JMenuBar menuBar;
private JMenu btnArchivo;
private JMenuItem btnCerrar;
private JMenu btnMantenimiento;
private JMenuItem btnConsultarCocina;
private JMenuItem btnModificarCocina;
private JMenuItem btnListarCocinas;
private JMenu btnVentas;
private JMenuItem btnVender;
private JMenuItem btnGernerarReportes;
private JMenu btnConfiguracion;
private JMenuItem btnConfigurarDescuentos;
private JMenuItem btnConfigurarObsequios;
private JMenuItem btnCantidadOptima;
private JMenuItem btnConfigurarCuotaDiaria;
private JMenu btnAyuda;
private JMenuItem btnAcercaTienda;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
menu frame = new menu();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public menu() {
setTitle("Menú");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 562, 448);
contentPane = new JPanel();
contentPane.setBackground(new Color(240, 240, 240));
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblNewLabel = new JLabel("MENÚ PRINCIPAL");
lblNewLabel.setForeground(new Color(0, 0, 255));
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel.setFont(new Font("Verdana", Font.BOLD, 15));
lblNewLabel.setBounds(20, 41, 387, 24);
contentPane.add(lblNewLabel);
menuBar = new JMenuBar();
menuBar.setToolTipText("");
menuBar.setMargin(new Insets(5, 5, 5, 5));
menuBar.setForeground(new Color(255, 255, 255));
menuBar.setBackground(new Color(255, 255, 255));
menuBar.setBounds(20, 76, 387, 42);
contentPane.add(menuBar);
btnArchivo = new JMenu("Archivo");
btnArchivo.setFont(new Font("Segoe UI", Font.BOLD, 12));
btnArchivo.setForeground(new Color(0, 0, 0));
btnArchivo.setBackground(new Color(255, 255, 255));
btnArchivo.setIcon(new ImageIcon(menu.class.getResource("/javax/swing/plaf/metal/icons/ocean/directory.gif")));
menuBar.add(btnArchivo);
btnCerrar = new JMenuItem("Cerrar");
btnCerrar.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnCerrar.setIcon(new ImageIcon(menu.class.getResource("/com/sun/javafx/webkit/prism/resources/missingImage.png")));
btnArchivo.add(btnCerrar);
btnMantenimiento = new JMenu("Mantenimiento");
btnMantenimiento.setForeground(new Color(0, 0, 0));
btnMantenimiento.setFont(new Font("Segoe UI", Font.BOLD, 12));
menuBar.add(btnMantenimiento);
btnConsultarCocina = new JMenuItem("Consultar Cocina");
btnConsultarCocina.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
consultarCocina modeloCocina = new consultarCocina();
modeloCocina.setVisible(true);
}
});
btnMantenimiento.add(btnConsultarCocina);
btnModificarCocina = new JMenuItem("Modificar Cocina");
btnModificarCocina.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
modificarCocina modCocina = new modificarCocina();
modCocina.setVisible(true);
}
});
btnMantenimiento.add(btnModificarCocina);
btnListarCocinas = new JMenuItem("Listar Cocinas");
btnListarCocinas.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
listarCocinas listar = new listarCocinas();
listar.setVisible(true);
}
});
btnMantenimiento.add(btnListarCocinas);
btnVentas = new JMenu("Ventas");
btnVentas.setFont(new Font("Segoe UI", Font.BOLD, 12));
btnVentas.setForeground(new Color(0, 0, 0));
menuBar.add(btnVentas);
btnVender = new JMenuItem("Vender");
btnVender.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
venderBoleta vender = new venderBoleta();
vender.setVisible(true);
}
});
btnVentas.add(btnVender);
btnGernerarReportes = new JMenuItem("Generar Reportes");
btnGernerarReportes.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
generarReportes reportes = new generarReportes();
reportes.setVisible(true);
}
});
btnVentas.add(btnGernerarReportes);
btnConfiguracion = new JMenu("Configuración");
btnConfiguracion.setForeground(new Color(0, 0, 0));
btnConfiguracion.setFont(new Font("Segoe UI", Font.BOLD, 12));
menuBar.add(btnConfiguracion);
btnConfigurarDescuentos = new JMenuItem("Configurar Descuentos");
btnConfigurarDescuentos.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
configurarDescuentos ModDescuento = new configurarDescuentos();
ModDescuento.setVisible(true);
}
});
btnConfiguracion.add(btnConfigurarDescuentos);
btnConfigurarObsequios = new JMenuItem("Configurar Obsequios");
btnConfigurarObsequios.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
configurarObsequio ModObsequio = new configurarObsequio();
ModObsequio.setVisible(true);
}
});
btnConfiguracion.add(btnConfigurarObsequios);
btnCantidadOptima = new JMenuItem("Configurar Cantidad Óptima");
btnCantidadOptima.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
configurarCantidadOptima cantidadOptima = new configurarCantidadOptima();
cantidadOptima.setVisible(true);
}
});
btnConfiguracion.add(btnCantidadOptima);
btnConfigurarCuotaDiaria = new JMenuItem("Configurar Cuota Diaria");
btnConfigurarCuotaDiaria.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
configurarCuotaDiaria configurarCuota = new configurarCuotaDiaria ();
configurarCuota.setVisible(true);
}
});
btnConfiguracion.add(btnConfigurarCuotaDiaria);
btnAyuda = new JMenu("Ayuda");
btnAyuda.setBackground(new Color(255, 255, 255));
btnAyuda.setIcon(new ImageIcon(menu.class.getResource("/com/sun/java/swing/plaf/motif/icons/Question.gif")));
menuBar.add(btnAyuda);
btnAcercaTienda = new JMenuItem("Acerca de Tienda");
btnAcercaTienda.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
acercaTienda integrantes = new acercaTienda();
//desktopPane.add(integrantes);
integrantes.setVisible(true);
}
});
btnAyuda.add(btnAcercaTienda);
lblNewLabel_1 = new JLabel("");
lblNewLabel_1.setIcon(new ImageIcon("C:\\Farit\\Cibertec\\Introducción a la Algoritmia\\WorkSpace Eclipse 2020\\Trabajo Grupal\\bin\\Image.jpg"));
lblNewLabel_1.setBounds(30, 121, 377, 179);
//ImageIcon ico = new ImageIcon (getClass().getResource("Image.jpg"));
//ImageIcon img = new ImageIcon(ico.getImage().getScaledInstance(lblNewLabel.getWidth(), lblNewLabel.getHeight(), Image.SCALE_SMOOTH));
//lblNewLabel_1.setIcon(new ImageIcon("C:\\Users\\Farit\\Desktop\\Image.jpg"));
contentPane.add(lblNewLabel_1);
lblNewLabel_2 = new JLabel("\"BIENVENIDO SISTEMA DE VENTAS\"");
lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 17));
lblNewLabel_2.setForeground(new Color(0, 0, 0));
lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_2.setBounds(20, 11, 390, 30);
contentPane.add(lblNewLabel_2);
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}
Editor is loading...
Leave a Comment