这是Java数据库系统项目开发实践源代码,所有代码经过测试

源代码在线查看: frame1.java~72~

软件大小: 8384 K
上传用户: gdmichael
关键词: Java 数据库系统 实践 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				package untitled5;								import java.awt.*;				import java.awt.event.*;				import javax.swing.*;				import com.borland.jbcl.layout.*;								//系统主界面				public class Frame1 extends JFrame {				  JPanel contentPane;				  JMenuBar jMenuBar1 = new JMenuBar();				  JMenu 产品展示 = new JMenu();				  JMenuItem 产品信息 = new JMenuItem();				  JMenu 小订单管理 = new JMenu();				  JMenuItem 订单登记 = new JMenuItem();				  XYLayout xYLayout1 = new XYLayout();				  JLabel jLabel1 = new JLabel();				  JMenu jMenu1 = new JMenu();				  JMenuItem jMenuItem5 = new JMenuItem();				  JMenu jMenu2 = new JMenu();				  JMenuItem jMenuItem7 = new JMenuItem();				  JMenu jMenu3 = new JMenu();				  JMenuItem jMenuItem8 = new JMenuItem();				  JMenuItem jMenuItem1 = new JMenuItem();				  JMenuItem jMenuItem3 = new JMenuItem();				  JLabel jLabel2 = new JLabel();				  JLabel jLabel3 = new JLabel();				  JMenu jMenu5 = new JMenu();				  JMenuItem jMenuItem2 = new JMenuItem();								  //Construct the frame				  public Frame1() {				    enableEvents(AWTEvent.WINDOW_EVENT_MASK);				    try {				      jbInit();				    }				    catch(Exception e) {				      e.printStackTrace();				    }				  }				  //Component initialization				  private void jbInit() throws Exception  {				    contentPane = (JPanel) this.getContentPane();				    contentPane.setLayout(xYLayout1);				    this.setSize(new Dimension(600, 500));				    this.setTitle("销售管理系统");				    产品展示.setFont(new java.awt.Font("SansSerif", 0, 20));				    产品展示.setText("产品展示");				    产品信息.setFont(new java.awt.Font("SansSerif", 0, 20));				    产品信息.setText("产品信息查询");				    产品信息.addActionListener(new Frame1_产品信息_ActionAdapter(this));				    小订单管理.setFont(new java.awt.Font("SansSerif", 0, 20));				    小订单管理.setText("小订单管理");				    小订单管理.addActionListener(new Frame1_小订单管理_actionAdapter(this));				    订单登记.setFont(new java.awt.Font("SansSerif", 0, 20));				    订单登记.setText("小订单登记");				    订单登记.addActionListener(new Frame1_订单登记_ActionAdapter(this));				    jLabel1.setFont(new java.awt.Font("SansSerif", 0, 40));				    jLabel1.setForeground(new Color(210, 0, 0));				    jLabel1.setHorizontalAlignment(SwingConstants.LEADING);				    jLabel1.setText("销售管理系统");				    contentPane.setFont(new java.awt.Font("Dialog", 0, 11));				    contentPane.setForeground(Color.darkGray);				    jMenu1.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenu1.setText("合同管理");				    jMenuItem5.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenuItem5.setText("合同登记");				    jMenuItem5.addActionListener(new Frame1_jMenuItem5_actionAdapter(this));				    jMenu2.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenu2.setFocusPainted(false);				    jMenu2.setText("业务单位");				    jMenuItem7.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenuItem7.setText("业务单位信息");				    jMenuItem7.addActionListener(new Frame1_jMenuItem7_actionAdapter(this));				    jMenu3.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenu3.setText("业务信息");				    jMenuItem8.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenuItem8.setText("产品仓库信息");				    jMenuItem8.addActionListener(new Frame1_jMenuItem8_actionAdapter(this));				    产品展示.addSeparator();				    jMenuItem1.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenuItem1.setText("顾客信息");				    jMenuItem1.addActionListener(new Frame1_jMenuItem1_actionAdapter(this));				    jMenuItem3.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenuItem3.setText("销售人员信息");				    jMenuItem3.addActionListener(new Frame1_jMenuItem3_actionAdapter(this));				    jLabel2.setFont(new java.awt.Font("SansSerif", 0, 30));				    jLabel2.setForeground(Color.red);				    jLabel2.setText("辛苦你了!");				    jLabel3.setFont(new java.awt.Font("SansSerif", 0, 30));				    jLabel3.setForeground(Color.red);				    jLabel3.setText("亲爱的职工!");				    jMenu5.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenu5.setText("退出系统");				    jMenuItem2.setFont(new java.awt.Font("SansSerif", 0, 20));				    jMenuItem2.setText("退出");				    jMenuItem2.addActionListener(new Frame1_jMenuItem2_actionAdapter(this));				    jMenuItem2.addItemListener(new Frame1_jMenuItem2_itemAdapter(this));				    产品展示.add(产品信息);				    产品展示.addSeparator();				    小订单管理.addSeparator();				    小订单管理.add(订单登记);				    小订单管理.addSeparator();				    jMenuBar1.add(产品展示);				    jMenuBar1.add(小订单管理);				    jMenuBar1.add(jMenu1);				    jMenuBar1.add(jMenu2);				    jMenuBar1.add(jMenu3);				    jMenuBar1.add(jMenu5);				    jMenu1.addSeparator();				    jMenu1.add(jMenuItem5);				    jMenu1.addSeparator();				    jMenu2.addSeparator();				    jMenu2.add(jMenuItem7);				    jMenu2.addSeparator();				    jMenu2.add(jMenuItem1);				    jMenu2.addSeparator();				    jMenu3.addSeparator();				    jMenu3.add(jMenuItem8);				    jMenu3.addSeparator();				    jMenu3.add(jMenuItem3);				    jMenu3.addSeparator();				    contentPane.add(jLabel1, new XYConstraints(175, 1, -1, -1));				    contentPane.add(jLabel3,      new XYConstraints(304, 195, 183, 47));				    contentPane.add(jLabel2, new XYConstraints(99, 198, 163, 45));				    jMenu5.addSeparator();				    jMenu5.add(jMenuItem2);				    jMenu5.addSeparator();				    this.setJMenuBar(jMenuBar1);				  }				  //File | Exit action performed				  public void 产品信息_actionPerformed(ActionEvent e) {				    try {				     Frame2   Frame= new Frame2();				       Frame.show();								    }				    catch (Exception ew) {								          System.out.println(ew.getMessage());				    }												  }				  //Help | About action performed				  public void 订单登记_actionPerformed(ActionEvent e) {				    try {				     Frame3   Frame= new Frame3();				       Frame.show();								    }				    catch (Exception ew) {								          System.out.println(ew.getMessage());				    }												  }				  //Overridden so we can exit when window is closed				  protected void processWindowEvent(WindowEvent e) {				    super.processWindowEvent(e);				    if (e.getID() == WindowEvent.WINDOW_CLOSING) {				      产品信息_actionPerformed(null);				    }				  }																  void 增加产品展示_actionPerformed(ActionEvent e) {				    try {												  }				  catch (Exception ew) {								        System.out.println(ew.getMessage());				  }																				  }								  void jMenuItem1_actionPerformed(ActionEvent e) {   try {				   delreader1   Frame= new delreader1();				     Frame.show();								  }				  catch (Exception ew) {								        System.out.println(ew.getMessage());				  }												  }								  void jMenuItem3_actionPerformed(ActionEvent e) {				    try {				      unserve   Frame= new unserve();				     Frame.show();				  }				  catch (Exception ew) {								        System.out.println(ew.getMessage());				  }								  }								  void jMenuItem4_actionPerformed(ActionEvent e) {				    try {				     delbook   Frame= new delbook();				       Frame.show();								    }				    catch (Exception ew) {								          System.out.println(ew.getMessage());				    }												  }								  void jMenuItem5_actionPerformed(ActionEvent e) {				    try {				     borrow  Frame= new borrow();				       Frame.show();								    }				    catch (Exception ew) {								          System.out.println(ew.getMessage());				    }												  }								  void jMenuItem6_actionPerformed(ActionEvent e) {				    try {				     retur  Frame= new retur();				       Frame.show();								    }				    catch (Exception ew) {								          System.out.println(ew.getMessage());				    }												  }								  void jMenuItem7_actionPerformed(ActionEvent e) {				   ///////////////////////////////////////////////				   try {				   delbook  Frame= new delbook();				   Frame.show();												   }				   catch (Exception ew) {								         System.out.println(ew.getMessage());				   }								  }								  void jMenuItem8_actionPerformed(ActionEvent e) {				    try {				        language  Frame= new language();				          Frame.show();								       }				       catch (Exception ew) {								             System.out.println(ew.getMessage());				       }								  }																  void jMenuItem2_itemStateChanged(ItemEvent e) {				     System.exit(0);				  }								  void jMenuItem2_actionPerformed(ActionEvent e) {				 System.exit(0);				  }								  void 小订单管理_actionPerformed(ActionEvent e) {								  }																				}								class Frame1_产品信息_ActionAdapter implements ActionListener {				  Frame1 adaptee;								  Frame1_产品信息_ActionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.产品信息_actionPerformed(e);				  }				}								class Frame1_订单登记_ActionAdapter implements ActionListener {				  Frame1 adaptee;								  Frame1_订单登记_ActionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.订单登记_actionPerformed(e);				  }				}								class Frame1_jMenuItem5_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_jMenuItem5_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.jMenuItem5_actionPerformed(e);				  }				}								class Frame1_jMenuItem7_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_jMenuItem7_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.jMenuItem7_actionPerformed(e);				  }				}								class Frame1_jMenuItem8_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_jMenuItem8_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.jMenuItem8_actionPerformed(e);				  }				}								class Frame1_jMenuItem1_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_jMenuItem1_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.jMenuItem1_actionPerformed(e);				  }				}								class Frame1_jMenuItem3_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_jMenuItem3_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.jMenuItem3_actionPerformed(e);				  }				}								class Frame1_jMenuItem2_itemAdapter implements java.awt.event.ItemListener {				  Frame1 adaptee;								  Frame1_jMenuItem2_itemAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void itemStateChanged(ItemEvent e) {				    adaptee.jMenuItem2_itemStateChanged(e);				  }				}								class Frame1_jMenuItem2_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_jMenuItem2_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.jMenuItem2_actionPerformed(e);				  }				}								class Frame1_小订单管理_actionAdapter implements java.awt.event.ActionListener {				  Frame1 adaptee;								  Frame1_小订单管理_actionAdapter(Frame1 adaptee) {				    this.adaptee = adaptee;				  }				  public void actionPerformed(ActionEvent e) {				    adaptee.小订单管理_actionPerformed(e);				  }				}			

相关资源