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

📄 maindemouserframe2.java~36~

📁 该文件中包含有源代码及一部分的文档,该系统是一个小型的英语单词字典的系统.
💻 JAVA~36~
📖 第 1 页 / 共 2 页
字号:
                   +"价格:"+rs.getString(8)+"\n"+text;
        }
        if(text.equals("")){
         text = "无此书!";
         }
        jTextArea1.setText(text);
           } catch (SQLException ex) {
        ex.printStackTrace();
        }

    }

    public void jPanel6_componentShown(ComponentEvent e) {
        Database database = new Database();
        String sql = "select distinct ClassName from book,BookClass ";
        ResultSet rs = database.query(sql);
        try {
            while (rs.next()) {
                jComboBox3.addItem(rs.getString(1));
            }
        } catch (SQLException ex) {
            ex.printStackTrace();
        }

    }

    public void jButton4_actionPerformed(ActionEvent e) {
        String ClassName = (String)jComboBox3.getSelectedItem();
        Database database = new Database();
        String sql = "select * from book ,BookClass where ClassName = '"+ClassName+"'" ;
        ResultSet rs = database.query(sql);
        try {
            String text = "";
            while (rs.next()) {
                text =  "书名:"+ rs.getString(2)+"    "

                     +"作者:"+rs.getString(4)+"    "
                     +"出版社:"+rs.getString(7)+"   "
                     +"价格:"+rs.getString(8)+"\n"+text;
         }
         if(text.equals("")){
             text = "无此书!";
         }
         jTextArea1.setText(text);
     } catch (SQLException ex) {
         ex.printStackTrace();
     }

    }

    public void jMenuItem9_actionPerformed(ActionEvent e) {
        Del_Dialog1 id = new Del_Dialog1(this);
        Dimension dlgSize = id.getPreferredSize();
        Dimension frmSize = getSize();
        Point loc = getLocation();
        id.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
             (frmSize.height - dlgSize.height) / 2 + loc.y);
        id.setModal(true);
        id.pack();
        id.setVisible(true);

    }

    public void jMenuItem7_actionPerformed(ActionEvent e) {
        Input_Dialog1 id = new Input_Dialog1(this);
        Dimension dlgSize = id.getPreferredSize();
        Dimension frmSize = getSize();
        Point loc = getLocation();
        id.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
                 (frmSize.height - dlgSize.height) / 2 + loc.y);
        id.setModal(true);
        id.pack();
        id.setVisible(true);

    }

    public void jMenuItem8_actionPerformed(ActionEvent e) {
        Modiy_Dialog1 id = new Modiy_Dialog1(this);
        Dimension dlgSize = id.getPreferredSize();
        Dimension frmSize = getSize();
        Point loc = getLocation();
        id.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
               (frmSize.height - dlgSize.height) / 2 + loc.y);
        id.setModal(true);
        id.pack();
        id.setVisible(true);

    }
}


class MainDemoUserFrame2_jMenuItem8_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem8_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem8_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jButton4_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jButton4_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton4_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jButton2_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jButton2_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton2_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jPanel5_componentAdapter extends ComponentAdapter {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jPanel5_componentAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void componentShown(ComponentEvent e) {
        adaptee.jPanel5_componentShown(e);
    }
}


class MainDemoUserFrame2_jButton3_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jButton3_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton3_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jPanel6_componentAdapter extends ComponentAdapter {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jPanel6_componentAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void componentShown(ComponentEvent e) {
        adaptee.jPanel6_componentShown(e);
    }
}


class MainDemoUserFrame2_jPanel1_componentAdapter extends ComponentAdapter {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jPanel1_componentAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void componentShown(ComponentEvent e) {
        adaptee.jPanel1_componentShown(e);
    }
}


class MainDemoUserFrame2_jMenuItem6_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem6_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem6_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jMenuItem9_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem9_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem9_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jMenuItem7_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem7_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem7_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jButton1_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jButton1_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jPanel3_componentAdapter extends ComponentAdapter {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jPanel3_componentAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void componentShown(ComponentEvent componentEvent) {
        adaptee.jPanel3_componentShown(componentEvent);
    }
}


class MainDemoUserFrame2_jPanel4_componentAdapter extends ComponentAdapter {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jPanel4_componentAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void componentShown(ComponentEvent componentEvent) {
        adaptee.jPanel4_componentShown(componentEvent);
    }
}


class MainDemoUserFrame2_jMenuItem3_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem3_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem3_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jMenuItem4_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem4_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem4_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jMenuItem5_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem5_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem5_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jMenuItem2_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem2_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem2_actionPerformed(e);
    }
}


class MainDemoUserFrame2_jMenuItem1_actionAdapter implements ActionListener {
    private MainDemoUserFrame2 adaptee;
    MainDemoUserFrame2_jMenuItem1_actionAdapter(MainDemoUserFrame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jMenuItem1_actionPerformed(e);
    }
}

⌨️ 快捷键说明

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