⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bookmanagermain.java

📁 教材管理系统
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
    jMenu1.add(jMenuIteminqbyISBN);
    jMenu1.add(jMenuIteminqbybookname);
    jMenu1.add(jMenuIteminqbybooktype);
    jMenu1.add(jMenuIteminqbyorderuser);
    jMenuoutBook.add(jMenuItemoutbookS);
    jMenuoutBook.add(jMenu4);
    jMenu4.add(jMenuItemoutbookSquery);
    jMenu4.add(jMenuItemoutqbyISBN);
    jMenu4.add(jMenuItemoutqbybookname);
    jMenu3.add(jMenuItemxitongshuoming);
    jMenu5.add(jMenuItemrecordpayquery);
    jMenu5.add(jMenuItempayqbydepartment);
    XYLayout xYLayout1 = new XYLayout();
    JToolBar jToolBar1 = new JToolBar();//创建一个工具栏
    jToolBar1.setLayout(xYLayout1);



    jToolBar1.add(jButtonuserUpdate,     new XYConstraints(-3, 0, 147, 78));
    jToolBar1.add(jButtonorderbookquery,    new XYConstraints(-3, 154, 147, 78));
    jToolBar1.add(jButtoninqbybookname, new XYConstraints(-3, 232, 147, 78));
    jToolBar1.add(jButtonoutbookSquery, new XYConstraints(-3, 309, 147, 78));
    jToolBar1.add(jButtonrecordpayquery,  new XYConstraints(-3, 387, 147, 78));
    jToolBar1.add(jButtonbookList,  new XYConstraints(-3, 77, 147, 78));
    jToolBar1.add(jButton1,  new XYConstraints(142, 0, 633, 591));

    contentPane.add(jToolBar1, BorderLayout.CENTER);
    jMenu2.add(jMenuItembookList);
    jMenu2.add(jMenuItembookqueryzonghe);
    jMenu6.add(jMenuItemlianxiwomen);
    jMenu6.add(jMenuItemchakanliuyan);
    jToolBar1.add(jButtonCalculator, new XYConstraints( -4, 465, 147, 126));
    ImageIcon img = new ImageIcon("about.png");


    this.setJMenuBar(jMenuBar);
}

  public void setEnable(String powertype) {
    if (powertype.equals("管理员")) {
      jMenuUserManager.setEnabled(true);
      jMenuBookManager.setEnabled(true);
      jMenuoutBook.setEnabled(true);
      jMenuinBook.setEnabled(true);
      jMenuoutBook.setEnabled(true);
    }
    else if (powertype.equals("普通用户")) {
      jMenuUserManager.setEnabled(true);
      jMenuBookManager.setEnabled(true);
      jMenuoutBook.setEnabled(true);
      jMenuinBook.setEnabled(true);
      jMenuoutBook.setEnabled(true);
    }
    else if (powertype.equals("出入库操作员")) {
      jMenuUserManager.setEnabled(true);
      jMenuBookManager.setEnabled(true);
      jMenuoutBook.setEnabled(true);
      jMenuinBook.setEnabled(true);
      jMenuoutBook.setEnabled(true);
    }
    else {
      jMenuUserManager.setEnabled(true);
      jMenuBookManager.setEnabled(true);
      jMenuoutBook.setEnabled(true);
      jMenuinBook.setEnabled(true);
      jMenuoutBook.setEnabled(true);
    }
  }

//在主窗体被打开时打开登陆窗口
  void this_windowOpened(WindowEvent e) {
    setEnable("else");
    //采用 userLogin(this)的形式,将父窗体对象传入
    userLogin dlg = new userLogin(this);
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }

//打开登陆窗口
  void jMenuItemLogin_actionPerformed(ActionEvent e) {
    userLogin dlg = new userLogin(this);
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }

//打开添加用户窗口
  void jMenuItemUserAdd_actionPerformed(ActionEvent e) {
    userAdd dlg = new userAdd();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }

//打开用户密码修改窗口
  void jMenuItemUserUpdate_actionPerformed(ActionEvent e) {
    userUpdate dlg = new userUpdate();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }
  void jButtonuserUpdate_actionPerformed(ActionEvent e) {

   jButtonuserUpdate.setIcon(new  ImageIcon ("7.jpg"));

    userUpdate dlg = new userUpdate();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }



//打开用户删除窗口
  void jMenuItemUserDelete_actionPerformed(ActionEvent e) {
    userDelete dlg = new userDelete();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }
  //打开用户查询窗口
  void jMenuItemusersearch_actionPerformed(ActionEvent e) {
    usersearch dlg = new usersearch();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }


//打开教材预订添加窗口
  void jMenuItembookorderAdd_actionPerformed(ActionEvent e) {
    bookorderAdd dlg = new bookorderAdd();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }

//打开教材预定更新窗口
  void jMenuItemBookorderUpdate_actionPerformed(ActionEvent e) {
    bookorderUpdate dlg = new bookorderUpdate();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }




  void   jButtonorderbookquery_actionPerformed(ActionEvent e) {
    jButtonorderbookquery.setIcon(new ImageIcon("9.jpg"));

    orderbookquery dlg = new orderbookquery();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }

  void jMenuItemorderbookList_actionPerformed(ActionEvent e) {
   orderbookList dlg = new orderbookList();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }



//打开添加教材信息窗口
  void jMenuItembookAdd_actionPerformed(ActionEvent e) {
   bookAdd dlg = new bookAdd();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }






//打开书籍出库 窗口
  void jMenuItemoutbookS_actionPerformed(ActionEvent e) {
    outBookS dlg = new outBookS();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();
  }

//打开书籍出库 窗口
  void jMenuItemoutbookSquery_actionPerformed(ActionEvent e) {
    outbookSquery dlg = new outbookSquery();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();
  }

  void jButtonoutbookSquery_actionPerformed(ActionEvent e) {
  jButtonoutbookSquery.setIcon(new  ImageIcon ("11.jpg"));

    outbookSquery dlg = new outbookSquery();
   Dimension dlgSize = dlg.getPreferredSize();
   Dimension frmSize = getSize();
   Point loc = getLocation();
   dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                   (frmSize.height - dlgSize.height) / 2 + loc.y);
   dlg.pack();
   dlg.show();
 }



  void jMenuItemoutqbyISBN_actionPerformed(ActionEvent e) {
   outqbyISBN dlg = new outqbyISBN();
   Dimension dlgSize = dlg.getPreferredSize();
   Dimension frmSize = getSize();
   Point loc = getLocation();
   dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                   (frmSize.height - dlgSize.height) / 2 + loc.y);
   dlg.pack();
   dlg.show();
 }
 void jMenuItemoutqbybookname_actionPerformed(ActionEvent e) {
   outqbybookname dlg = new outqbybookname();
   Dimension dlgSize = dlg.getPreferredSize();
   Dimension frmSize = getSize();
   Point loc = getLocation();
   dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                   (frmSize.height - dlgSize.height) / 2 + loc.y);
   dlg.pack();
   dlg.show();
 }



//打开按院系查询交费情况
  void jMenuItempayqbydepartment_actionPerformed(ActionEvent e) {
    payqbydepartment dlg = new payqbydepartment();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();
  }

//打开教材入库窗口
  void jMenuItemBookin_actionPerformed(ActionEvent e) {
   inBook dlg = new inBook();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
                    (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.pack();
    dlg.show();

  }

//打开书籍入库查询按ISBN号查询
  void jMenuIteminqbyISBN_actionPerformed(ActionEvent e) {
   inqbyISBN dlg = new inqbyISBN();
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -