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

📄 readersystempanel.java

📁 图书管理系统源代码,05年某人写的,还算不错
💻 JAVA
📖 第 1 页 / 共 5 页
字号:

        jLabel7.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel7.setForeground(Color.blue);
        jLabel7.setText("读者类型");
        jLabel7.setBounds(new Rectangle(9, 44, 62, 30));
        jLabel8.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel8.setForeground(Color.blue);
        jLabel8.setText("读者电话");
        jLabel8.setBounds(new Rectangle(22, 125, 62, 30));
        jLabel9.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel9.setForeground(Color.blue);
        jLabel9.setText("使用期限");
        jLabel9.setBounds(new Rectangle(22, 159, 62, 30));
        jLabel10.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel10.setForeground(Color.blue);
        jLabel10.setText("证件编号");
        jLabel10.setBounds(new Rectangle(22, 84, 62, 30));
        jTextField9.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jTextField9.setForeground(SystemColor.activeCaption);
        jTextField9.setBounds(new Rectangle(101, 88, 222, 27));
        jTextField10.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jTextField10.setForeground(SystemColor.activeCaption);
        jTextField10.setBounds(new Rectangle(99, 14, 222, 27));
        jLabel11.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel11.setForeground(Color.blue);
        jLabel11.setText("是否借书");
        jLabel11.setBounds(new Rectangle(22, 45, 62, 30));
        jButton5.setBounds(new Rectangle(140, 201, 101, 28));
        jButton5.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jButton5.setForeground(Color.blue);
        jButton5.setText("数据重置");
        jTextField11.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jTextField11.setForeground(SystemColor.activeCaption);
        jTextField11.setBounds(new Rectangle(102, 163, 222, 27));
        jlbMassageG.setBackground(SystemColor.control);
        jlbMassageG.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jlbMassageG.setForeground(Color.red);
        jlbMassageG.setBorder(null);
        jlbMassageG.setCaretColor(Color.pink);
        jlbMassageG.setText("");
        jlbMassageG.setLineWrap(true);
        jlbMassageG.setBounds(new Rectangle(372, 10, 120, 184));
        jTextField12.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jTextField12.setForeground(SystemColor.activeCaption);
        jTextField12.setText("");
        jTextField12.setBounds(new Rectangle(100, 50, 222, 27));
        jTextField13.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jTextField13.setForeground(SystemColor.activeCaption);
        jTextField13.setText("");
        jTextField13.setBounds(new Rectangle(101, 127, 222, 27));
        jPanelRigth2.setBackground(SystemColor.control);
        jPanelRigth2.setBorder(null);
        jPanelRigth2.setToolTipText("");
        jPanelRigth2.setBounds(new Rectangle(334, 1, 421, 237));
        jPanelRigth2.setLayout(null);
        jLabel12.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel12.setForeground(Color.blue);
        jLabel12.setText("读者姓名");
        jLabel12.setBounds(new Rectangle(22, 12, 62, 30));

        jTpRightBottomjPanel3.addComponentListener(new
                ReaderSystemPanel_jTpRightBottomjPanel3_componentAdapter(this));
        jTpRightBottomjPanel4.addComponentListener(new
                ReaderSystemPanel_jTpRightBottomjPanel4_componentAdapter(this));
        this.add(jPanelSystemTop);
        jPanelSystemTop.add(jBttsjy);
        this.add(jTpRightM);
        jPanelRigthY.add(jLabel16);
        jPanelRigthY.add(jLabel18);
        jPanelRigthY.add(jLabel20);
        jPanelRigthY.add(jLabel22);
        jPanelRigthY.add(jLabel6);
        jPanelRigthY.add(jTextField19);
        jPanelRigthY.add(jTextField20);
        jPanelRigthY.add(jTextField21);
        jPanelRigthY.add(jTextField18);
        jPanelRigthY.add(jTextField8);
        jPanelRigthY.add(jlbMassageY);
        jPanelRigthY.add(jButton6);
        jPanelLeftY.add(jLabel15);
        jPanelLeftY.add(jTextField4);
        jPanelLeftY.add(jLabel19);
        jPanelLeftY.add(jLabel14);
        jPanelLeftY.add(jTextField17);
        jPanelLeftY.add(jtxZhengjian2);
        jPanelLeftY.add(jLabel17);
        jPanelLeftY.add(jtxType2);
        jPanelLeftY.add(jtxReaderNumY);
        jPanelLeftY.add(jLabel21);
        jPanelLeftY.add(jButton4);
        jTpRightBottomjPanel2.add(jPanelRigthY);
        jTpRightBottomjPanel2.add(jPanelLeftY);
        jPanelRigth1.add(jLabel52);
        jPanelRigth1.add(jLabel53);
        jPanelRigth1.add(jLabel51);
        jPanelRigth1.add(jLabel55);
        jPanelRigth1.add(jLabel54);
        jPanelRigth1.add(jTextField40);
        jPanelRigth1.add(jTextField42);
        jPanelRigth1.add(jTextField41);
        jPanelRigth1.add(jTextField38);
        jPanelRigth1.add(jTextField39);
        jPanelRigth1.add(jButton11);
        jPanelRigth1.add(jlbMassage);
        this.add(jPanelBottom);
        jPanelBottom.add(jScrollPane1);
        jPanelBottom.add(jPanel1btmm);
        jPanel1btmm.add(btnW);
        jPanel1btmm.add(btnY);
        jPanel1btmm.add(btnQ);
        jScrollPane1.getViewport().add(radearjTable);
        jPanelleftJ.add(jtxNum1);

        jPanelleftJ.add(jLabel39);

        jPanelleftJ.add(jLabel35);
        jPanelleftJ.add(jLabel33);
        jPanelleftJ.add(jLabel32);
        jPanelleftJ.add(jtxAdd1);
        jPanelleftJ.add(jLabel42);
        jPanelleftJ.add(jButton2);
        jPanelleftJ.add(jtxDangqianTime);
        jPanelleftJ.add(jtxZhengjian1);
        jPanelleftJ.add(jtxType1);
        jTpRightBottomjPanel1.add(jPanelRigthJ);
        jPanelRigthJ.add(jLabel34);
        jPanelRigthJ.add(jLabel36);
        jPanelRigthJ.add(jtxName1);
        jPanelRigthJ.add(jtxYajin1);
        jPanelRigthJ.add(jLabel38);
        jPanelRigthJ.add(jtxZhengjianNum1);
        jPanelRigthJ.add(jtxTelphone1);
        jPanelRigthJ.add(jLabel40);
        jPanelRigthJ.add(jLabel41);
        jPanelRigthJ.add(jRadioButton2);
        jPanelRigthJ.add(jRadioButton1);
        jPanelRigthJ.add(jButton8);
        jTpRightBottomjPanel1.add(jPanelleftJ);
        buttonGroupSex.add(jRadioButton1);
        buttonGroupSex.add(jRadioButton2);
        jTpRightM.add(jTpRightBottomjPanel1,"借阅证办理业务     ");
        jTpRightM.add(jTpRightBottomjPanel2, "借阅证延期办理业务     ");
        jTpRightM.add(jTpRightBottomjPanel3,"借阅证注销业务      ");
        jTpRightBottomjPanel3.add(jPanelLeft1);
        jPanelLeft1.add(jLabel3);
        jPanelLeft1.add(jtxReaderNumZ);
        jPanelLeft1.add(jLabel25);
        jPanelLeft1.add(jtxType3);
        jPanelLeft1.add(jtxZhengjian3);
        jPanelLeft1.add(jLabel26);
        jPanelLeft1.add(jLabel23);
        jPanelLeft1.add(jTextField3);
        jPanelLeft1.add(jTextField26);
        jPanelLeft1.add(jLabel24);
        jPanelLeft1.add(jButton3);
        jTpRightBottomjPanel3.add(jPanelRigth1);
        jTpRightM.add(jTpRightBottomjPanel4,"证件挂失和恢复业务   ");
        jPanelRigth2.add(jLabel8);
        jPanelRigth2.add(jLabel12);
        jPanelRigth2.add(jTextField10);
        jPanelRigth2.add(jTextField12);
        jPanelRigth2.add(jLabel11);
        jPanelRigth2.add(jLabel10);
        jPanelRigth2.add(jTextField9);
        jPanelRigth2.add(jTextField13);
        jPanelRigth2.add(jLabel9);
        jPanelRigth2.add(jTextField11);
        jPanelRigth2.add(jButton5);
        jPanelRigth2.add(jlbMassageG);
        jTpRightBottomjPanel4.add(jPanelLeft2);
        jPanelLeft2.add(jButton1);
        jPanelLeft2.add(jLabel2);
        jPanelLeft2.add(jtxReaderNumG1);
        jPanelLeft2.add(jtxType4);
        jPanelLeft2.add(jLabel7);
        jPanelLeft2.add(jLabel1);
        jPanelLeft2.add(jtxZhengjian4);
        jPanelLeft2.add(jTextField5);
        jPanelLeft2.add(jLabel5);
        jPanelLeft2.add(jLabel4);
        jPanelLeft2.add(jTextField2);
        jTpRightBottomjPanel4.add(jPanelRigth2);
    }



    public void typeshow()
   {
       String sql = "select typeName,foregift from readerType";
       int size = 0;
       ResultSet re=null;
       re = dh.search(sql);
       try {
           while(re.next())
              size++;
          ztype=new String[size];
          yajinArry= new float[size];
           boolean temp =re.first();
           for(int i=0;temp;i++)
           {

               ztype[i]=re.getString(1).trim();
            //   jtxType1.addItem(ztype[i]);
               yajinArry[i]=re.getFloat(2);
               temp =re.next();
           }
          // jtxType1 = new JComboBox(ztype);
         //  jtxType1.updateUI();

       } catch (SQLException ex) {
           System.out.println(ex.toString());

       }
       dh.myClose(1);
   }


    public void this_ancestorResized(HierarchyEvent e) {
        jTpRightM.setSize((this.getWidth()) - 5,
                          (this.getHeight() - 30) * 3 / 5);
        jPanelBottom.setBounds(1, jTpRightM.getHeight() + jTpRightM.getY(),
                               (this.getWidth()) - 5,
                               (this.getHeight() - 30) * 2 / 5);
        jPanelSystemTop.setSize((this.getWidth()) - 5, 30);
    }

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

    public void jSpSystemPanel_componentResized(ComponentEvent e) {

    }

    public void jPanelBottom_componentResized(ComponentEvent e) {
        jScrollPane1.setBounds(1, 2, jPanelBottom.getWidth() - 5,
                               jPanelBottom.getHeight() - 33);
        jPanel1btmm.setBounds(1, jPanelBottom.getHeight() - 31,
                              jPanelBottom.getWidth() - 5, 28);
    }

    public void jPanel1btmm_componentResized(ComponentEvent e) {
        btnQ.setBounds((jPanel1btmm.getWidth() / 3 - 100) / 2, 4, 110, 23);
        btnW.setBounds((jPanel1btmm.getWidth() / 3 - 100) / 2 +
                       jPanel1btmm.getWidth() / 3, 4, 110, 23);
        btnY.setBounds((jPanel1btmm.getWidth() / 3 - 100) / 2 +
                       jPanel1btmm.getWidth() * 2 / 3, 4, 110, 23);
    }

    public void jtxBanzhengshijian_actionPerformed(ActionEvent e) {
        jtxDangqianTime.setText(SystemFrame1.dateTime);
    }
    public void qingkong()
    {
        jtxDangqianTime.setText(" 点击获取当前时间");
        jtxAdd1.setText("");
        jtxTelphone1.setText("");
        jtxZhengjianNum1.setText("");
        jtxName1.setText("");
        jtxNum1.setText("");
        jtxYajin1.setText("选择读者类型点击获取押金值");
        jtxNum1.setText("在填写资料后点击获取");
    }
    public void jButton8_actionPerformed(ActionEvent e) {
        qingkong();
    }


    public void jtxBanzhengshijian_mouseClicked(MouseEvent e) {

        jtxDangqianTime.setText(SystemFrame1.dateTime.substring(0,4)+"年"+SystemFrame1.dateTime.substring(4,6)+"月"+SystemFrame1.dateTime.substring(6)+"日");
    }

    //设置显示的押金
    private void yajingShow()
    {
       // typeshow();
        int size=jtxType1.getItemCount();
        int i=0;
        while(i < size){
            if (jtxType1.getSelectedIndex() == i){
                jtxYajin1.setText("押金是 " + yajinArry[i] + " 元");
                yj=yajinArry[i];
                break;
            }
            i++;
        }
    }
    public void jtxYajin1_mouseClicked(MouseEvent e) {

       yajingShow();
    }

    public void btnQ_actionPerformed(ActionEvent e) {
        shuaxin(radearjTable, -1);
    }

    public void shuaxin(JTable jta, int x) {
        String sql = "";
        if (x == 0)
            sql = "select readerID,readerName,readerSex,readerAddress,readerTelephone,readerTypeName,state,可借书数量=(booksQuantity-borrowBooksNum),beginTime,certificateNum  from reader  where state=0";
        else if (x == 1)
            sql = "select readerID,readerName,readerSex,readerAddress,readerTelephone,readerTypeName,state ,可借书数量=(booksQuantity-borrowBooksNum),beginTime,certificateNum from reader where state=1";
        else
            sql = "select readerID,readerName,readerSex,readerAddress,readerTelephone,readerTypeName,state,可借书数量=(booksQuantity-borrowBooksNum),beginTime,certificateNum from reader";

        dh.search(sql);

⌨️ 快捷键说明

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