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

📄 booksinfosystempanel.java

📁 图书管理系统源代码,05年某人写的,还算不错
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
        jtxBookStation2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookStation2.setForeground(Color.blue);
        jtxBookStation2.setBounds(new Rectangle(465, 105, 189, 23));
        jLabel14.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel14.setForeground(Color.blue);
        jLabel14.setText("操作人员");
        jLabel14.setBounds(new Rectangle(387, 140, 61, 14));
        jLabel15.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel15.setForeground(Color.blue);
        jLabel15.setText("书架位置");
        jLabel15.setBounds(new Rectangle(387, 109, 61, 14));
        jLabel16.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel16.setForeground(Color.blue);
        jLabel16.setText("图书编号");
        jLabel16.setBounds(new Rectangle(27, 53, 61, 14));
        jtxBookPurchaseMoney2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookPurchaseMoney2.setForeground(Color.blue);
        jtxBookPurchaseMoney2.setBounds(new Rectangle(465, 76, 189, 23));
        jtxBookConcern2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookConcern2.setForeground(Color.blue);
        jtxBookConcern2.setBounds(new Rectangle(465, 48, 189, 23));
        jtxBookType2.setEnabled(false);
        jtxBookType2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookType2.setForeground(Color.blue);
        jtxBookType2.setEditable(true);
        jtxBookType2.setBounds(new Rectangle(465, 18, 189, 23));
        jLabel17.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel17.setForeground(Color.red);
        jLabel17.setText("增加数量");
        jLabel17.setBounds(new Rectangle(27, 141, 61, 14));
        jtxBookLanguage2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookLanguage2.setForeground(Color.blue);
        jtxBookLanguage2.setBounds(new Rectangle(96, 106, 189, 23));
        jLabel18.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel18.setForeground(Color.blue);
        jLabel18.setText("图书名称");
        jLabel18.setBounds(new Rectangle(27, 23, 61, 14));
        jtxBookAuthor2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookAuthor2.setForeground(Color.blue);
        jtxBookAuthor2.setBounds(new Rectangle(96, 77, 189, 23));
        jtxBookNum2.setEnabled(false);
        jtxBookNum2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookNum2.setForeground(Color.magenta);
        jtxBookNum2.setText("请点击输入编号");
        jtxBookNum2.setBounds(new Rectangle(96, 49, 189, 23));
        jtxBookNum2.addMouseListener(new
                BooksInfoSystemPanel_jtxBookNum2_mouseAdapter(this));
        jtxBookBorrowMoneyNum2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxBookBorrowMoneyNum2.setForeground(Color.red);
        jtxBookBorrowMoneyNum2.setText("");
        jtxBookBorrowMoneyNum2.setBounds(new Rectangle(96, 137, 189, 23));
        jLabel19.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel19.setForeground(Color.blue);
        jLabel19.setText("图书定价");
        jLabel19.setBounds(new Rectangle(387, 80, 61, 14));
        jLabel20.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel20.setForeground(Color.blue);
        jLabel20.setText("出 版 社");
        jLabel20.setBounds(new Rectangle(387, 52, 61, 14));
        jLabel21.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel21.setForeground(Color.blue);
        jLabel21.setText("图书分类");
        jLabel21.setBounds(new Rectangle(387, 22, 61, 14));
        jTpRightBottomPanel2.setLayout(null);
        jTeaRightTop.getTableHeader().setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jTeaRightTop.getTableHeader().setForeground(Color.blue);
        jTeaRightTop.setGridColor(Color.cyan);
        jTeaRightTop.setRowHeight(20);
        jTeaRightTop.addMouseListener(new
                BooksInfoSystemPanel_jTeaRightTop_mouseAdapter(this));
        jPanelRightTopjPanel.setBorder(BorderFactory.createEtchedBorder());
        jPanelRightTopjPanel.setBounds(new Rectangle(1, 0, 607, 26));
        jPanelRightTopjPanel.setLayout(null);
        jScrollPane1.setBorder(null);
        jlbM.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jlbM.setForeground(Color.magenta);
        jlbM.setHorizontalAlignment(SwingConstants.CENTER);
        jlbM.setHorizontalTextPosition(SwingConstants.CENTER);
        jlbM.setText("图书信息列表");
        jlbM.setBounds(new Rectangle(7, 6, 598, 20));
        btnReset.setBounds(new Rectangle(290, 189, 123, 30));
        btnReset.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        btnReset.setForeground(Color.blue);
        btnReset.setText("数据重置");
        btnReset.addActionListener(new
                                   BooksInfoSystemPanel_btnReset_actionAdapter(this));
        btnQueRen.setBounds(new Rectangle(72, 188, 123, 30));
        btnQueRen.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        btnQueRen.setForeground(Color.blue);
        btnQueRen.setText("确认添加");
        btnQueRen.addActionListener(new
                BooksInfoSystemPanel_btnQueRen_actionAdapter(this));
        btnAddInfo.setBounds(new Rectangle(527, 188, 123, 30));
        btnAddInfo.setEnabled(false);
        btnAddInfo.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        btnAddInfo.setForeground(Color.blue);
        btnAddInfo.setText("添加备注信息");
        btnAddInfo.addActionListener(new
                BooksInfoSystemPanel_btnAddInfo_actionAdapter(this));
        btnQueRen2.setBounds(new Rectangle(27, 187, 123, 30));
        btnQueRen2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        btnQueRen2.setForeground(Color.blue);
        btnQueRen2.setText("确认添加");
        btnReset2.setBounds(new Rectangle(284, 188, 123, 30));
        btnReset2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        btnReset2.setForeground(Color.blue);
        btnReset2.setText("数据重置");
        btnReset2.addActionListener(new
                BooksInfoSystemPanel_btnReset2_actionAdapter(this));
        btnAddInfo2.setBounds(new Rectangle(531, 184, 123, 30));
        btnAddInfo2.setEnabled(true);
        btnAddInfo2.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        btnAddInfo2.setForeground(Color.blue);
        btnAddInfo2.setText("添加备注信息");
        booksLogOutPanel1.setVisible(false);


        this.add(jPanelSystemTop);
       jPanelSystemTop.add(jBttsbmrk);
       jPanelSystemTop.add(jBttszxgl);
       this.add(jSpSystemPanel);
       this.add(booksLogOutPanel1);
       jSpSystemPanel.add(jScleft, JSplitPane.LEFT);
       jSpSystemPanel.add(jScright, JSplitPane.RIGHT);
        jScright.getViewport().add(jPanRight);
       jPanRight.add(jPaneRightBottom);
       jPanRight.add(jPanelRightTop);
       jPanelRightTop.add(jScrollPane1);
        jPanelRightTop.add(jPanelRightTopjPanel);
        jPanelRightTopjPanel.add(jlbM);
        jScrollPane1.getViewport().add(jTeaRightTop);
       jPaneRightBottom.add(jTpRightBottom);
        jScleft.getViewport().add(jTreBooks);
        jTpRightBottomjPanel4.add(jLabel6);
        jTpRightBottomjPanel4.add(jLabel2);
        jTpRightBottomjPanel4.add(jLabel7);
        jTpRightBottomjPanel4.add(jLabel4);
        jTpRightBottomjPanel4.add(jLabel8);
        jTpRightBottomjPanel4.add(jtxBookAuthor);
        jTpRightBottomjPanel4.add(jtxBookNum1);
        jTpRightBottomjPanel4.add(jtxBookName1);
        jTpRightBottomjPanel4.add(jtxBookLanguage);
        jTpRightBottomjPanel4.add(jtxBookBorrowMoneyNum1);
        jTpRightBottomjPanel4.add(btnAddInfo);
        jTpRightBottomjPanel4.add(btnReset);
        jTpRightBottomjPanel4.add(btnQueRen);
        jTpRightBottomjPanel4.add(jtxBookPurchaseMoney);
        jTpRightBottomjPanel4.add(jLabel5);
        jTpRightBottomjPanel4.add(jtxBookType1);
        jTpRightBottomjPanel4.add(jtxBookConcern1);
        jTpRightBottomjPanel4.add(jLabel10);
        jTpRightBottomjPanel4.add(jLabel9);
        jTpRightBottomjPanel4.add(jtxBookStation);
        jTpRightBottomjPanel4.add(jLabel3);
        jTpRightBottomjPanel4.add(jLabel1);
        jTpRightBottomjPanel4.add(jtxBookBeginHandlers1);
        jTpRightBottomPanel2.add(jtxBookBorrowMoneyNum2);
        jTpRightBottomPanel2.add(jLabel18);
        jTpRightBottomPanel2.add(jtxBookName2);
        jTpRightBottomPanel2.add(jtxBookNum2);
        jTpRightBottomPanel2.add(jLabel16);
        jTpRightBottomPanel2.add(jtxBookAuthor2);
        jTpRightBottomPanel2.add(jLabel12);
        jTpRightBottomPanel2.add(jLabel13);
        jTpRightBottomPanel2.add(jtxBookLanguage2);
        jTpRightBottomPanel2.add(btnAddInfo2);
        jTpRightBottomPanel2.add(btnReset2);
        jTpRightBottomPanel2.add(jLabel17);
        jTpRightBottomPanel2.add(btnQueRen2);
        jTpRightBottomPanel2.add(jtxBookType2);
        jTpRightBottomPanel2.add(jLabel21);
        jTpRightBottomPanel2.add(jLabel20);
        jTpRightBottomPanel2.add(jLabel19);
        jTpRightBottomPanel2.add(jLabel15);
        jTpRightBottomPanel2.add(jLabel14);
        jTpRightBottomPanel2.add(jtxBookBeginHandlers2);
        jTpRightBottomPanel2.add(jtxBookStation2);
        jTpRightBottomPanel2.add(jtxBookPurchaseMoney2);
        jTpRightBottomPanel2.add(jtxBookConcern2);
        jTpRightBottom.add(jTpRightBottomjPanel4, "新书入库信息录入业务   ");
        jTpRightBottom.add(jTpRightBottomPanel2, "图书信息的增加、修改业务  ");
    }
    public void loginTree()
    {

        ResultSet re = null;
        DefaultMutableTreeNode bookstype[];

        int size=0;
        int j =0;
        int i=0;
        int arry[] = new int[26];
        //连接数据库
      //  if (db.getconn()) {
                //获得结果集
            re = db.searchTree();
            try {
                while(re.next())
                    size++;
                bookstype = new DefaultMutableTreeNode[size];
                boolean a=re.first();
                for(i=0,j=0;a;i++)
                {
                    String booktypeNum = re.getString(1).trim();
                    String booktypeName = re.getString(2).trim();
                    //创建树的枝
                    if (booktypeNum.length() == 1) {
                        arry[j]=i;
                        j++;
                        bookstype[i] = new DefaultMutableTreeNode(booktypeName);
                    }
                    else
                    {
                            //创建树的叶
                        bookstype[i] = new DefaultMutableTreeNode(booktypeName);
                       // bookstype[j-1].add(bookstype[i]);
                    }
                    a=re.next();
                }
                for(i=0,j=0;i<bookstype.length;i++)
                {
                    if(i!=arry[j])
                    {
                        bookstype[arry[j-1]].add(bookstype[i]);
                    }
                   else
                    {
                        j++;
                        books.add(bookstype[i]);
                    }
                }
            } catch (SQLException ex) {
                System.out.println(ex.toString());
            }
            jtxBookType1.updateUI();
            jTreBooks.updateUI();
            db.myClose(1);
      //  }
      //  else
        //    JOptionPane.showMessageDialog(this,"连接数据库失败","连接错误",JOptionPane.WARNING_MESSAGE);
    }

   public void this_ancestorResized(HierarchyEvent e) {
       booksLogOutPanel1.setSize((this.getWidth())-5,(this.getHeight()-30));
       jSpSystemPanel.setSize( (this.getWidth())-5,(this.getHeight()-30));
        jSpSystemPanel.setDividerLocation(0.21);
    }

   public void jScright_ancestorResized(HierarchyEvent e) {
       jPanRight.setSize((jScright.getWidth()-1),(jScright.getHeight()-1));
   }

   public void jPanRight_ancestorResized(HierarchyEvent e) {
       jPanelRightTopjPanel.setSize((jPanelRightTop.getWidth()),25);
       jPanelRightTop.setBounds(jPaneRightBottom.getX()+1,(jPaneRightBottom.getY()+jPaneRightBottom.getHeight()-1),(jPanRight.getWidth())-5,(jPanRight.getHeight()*3/7-1));
       jScrollPane1.setBounds(1,25,(jPanelRightTop.getWidth())-1,(jPanelRightTop.getHeight())-25);
       jlbM.setBounds(5,2,jPanelRightTopjPanel.getWidth()-10,20);
       jPaneRightBottom.setSize((jPanRight.getWidth())-5,(jPanRight.getHeight())*4/7-2);
   }



   public void jScright_componentResized(ComponentEvent e) {

       jPanRight.setSize((jScright.getWidth()-1),(jScright.getHeight()-1));
   }

   public void jPaneRightBottom_componentResized(ComponentEvent e) {
       jTpRightBottom.setSize(jPaneRightBottom.getWidth()-1,jPaneRightBottom.getHeight()-1);
   }

    public void jTreBooks_mouseClicked(MouseEvent e) {
        display();

    }
    public void tableDisp(String sql)
    {
        String[][] data;
         ResultSet rs;
          try
          {
                  rs = db.booksInfosearch(sql);

                  int count=0;

⌨️ 快捷键说明

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