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

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

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

相关代码

				package untitled5;								import java.awt.*;				import java.awt.event.*;				import javax.swing.*;				import com.borland.jbcl.layout.*;								/**				 * Title: 				 * Description: 				 * Copyright: Copyright (c) 2003				 * Company: 				 * @author not attributable				 * @version 1.0				 */				//系统主界面				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("小订单管理");				    入库登记.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 {				    yuding   Frame= new yuding();				      Frame.show();								   }				   catch (Exception ew) {								         System.out.println(ew.getMessage());				   }												  }								  void 取消预定_actionPerformed(ActionEvent e) {				    try {				    //unserve   Frame= new unserve();				    //  Frame.show();								   }				   catch (Exception ew) {								         System.out.println(ew.getMessage());				   }												  }								  void 增加库存管理_actionPerformed(ActionEvent e) {				    try {				   addreader   Frame= new addreader();				     Frame.show();								  }				  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);				  }												}								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);				  }				}			

相关资源