Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Java Proyecto 1
Java Proyecto 1
import java.awt.EventQueue;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.ImageIcon;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
menu1 frame = new menu1();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public menu1() {
setTitle("Menu Tienda");
}
public void actionPerformed(ActionEvent arg0) {
if (arg0.getSource() == this.mntmsorpresa) {
actionPerformedMntmsorpresa(arg0);
}
if (arg0.getSource() == this.mntmobsequio) {
actionPerformedMntmobsequio(arg0);
}
if (arg0.getSource() == this.mntmoptimo) {
actionPerformedMntmoptimo(arg0);
}
if (arg0.getSource() == this.mntmConfigurarDescuentos) {
actionPerformedMntmConfigurarDescuentos(arg0);
}
if (arg0.getSource() == this.mntmAcerca) {
actionPerformedMntmAcerca(arg0);
}
if (arg0.getSource() == this.mntmGenerar) {
actionPerformedMntmGenerar(arg0);
}
if (arg0.getSource() == this.mntmVender) {
actionPerformedMntmVender(arg0);
}
if (arg0.getSource() == this.mntmListarAlfajores) {
actionPerformedMntmListarAlfajores(arg0);
}
if (arg0.getSource() == this.mntmModificarAlfajores) {
actionPerformedMntmModificarAlfajores(arg0);
}
if (arg0.getSource() == this.mntmConsultarAlfajores) {
actionPerformedMntmConsultarAlfajores(arg0);
}
if (arg0.getSource() == this.mntmSalir) {
actionPerformedMntmSalir(arg0);
}
}
protected void actionPerformedMntmSalir(ActionEvent arg0) {
this.dispose();
}
protected void actionPerformedMntmConsultarAlfajores(ActionEvent arg0) {
consultar dcp;
dcp = new consultar();
dcp.setLocationRelativeTo(this);
dcp.setVisible(true);
}
protected void actionPerformedMntmModificarAlfajores(ActionEvent arg0) {
modificar dcp;
dcp = new modificar();
dcp.setLocationRelativeTo(this);
dcp.setVisible(true);
}
protected void actionPerformedMntmListarAlfajores(ActionEvent arg0) {
listar dcp;
dcp = new listar();
dcp.setLocationRelativeTo(this);
dcp.setVisible(true);
}