java课程设计报告学生家教管理系统设计与实现内容摘要:

xtArea[4].setText( 家教次数 () + )。 jTextArea[5].setText( 家教附加 () + )。 jTextArea[6].setText( 家教缺勤 () + )。 jTextArea[7].setText( 薪水 () + )。 jTextArea[8].setText(new ().toString())。 jTextArea[9].setText(context)。 (new ActionHappen1())。 (new ActionHappen1())。 jPanel[10] = new JPanel()。 jPanel[10].add(jButton1, )。 jPanel[10].add(jButton2, )。 jPanel[10].setLayout(new GridLayout(1, 2))。 (jPanel[10])。 //对 screen4 窗口进行布局管理 (true)。 (28, 28, 700, 600)。 (700, 600)。 ()。 (true)。 } //新建监听类实现接口,给窗口中的按钮添加监听 public class ActionHappen1 implements ActionListener { public void actionPerformed(ActionEvent e) { String name = ()。 if (确认替换 .equals(name)) { Teachers pop = new Teachers(jTextArea[0].getText(), jTextArea[1].getText(), jTextArea[2].getText(), jTextArea[3].getText(), 0, 0, 0, 0, null)。 Mteacher jobs3 = new Mteacher(jTextArea[0].getText(), jTextArea[1].getText(), 0, 0, 0, new () .toString())。 //调用 jdbc 包中 dbutil 的员工添加方法获取数据库里的内容 if ((pop, jTextArea[9].getText()) amp。 amp。 (jobs3)amp。 amp。 (jTextArea[9].getText())) { new Screen7()。 } else { new Screen6()。 new Screen()。 } } else if (取消 .equals(name)) { new Screen()。 } } } } ( 4) Screen3 package JM。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 public class Screen3 { JLabel jLabel[] = new JLabel[9]。 JPanel jPanel[] = new JPanel[10]。 String bString[] = { 姓名: , 所在大学 , 家教对象: , 星期家教安排: , 家教次数 , 家教附加: , 家教缺勤: , 薪水 :, 时间 }。 JButton jButton1 = new JButton(确认添加 )。 JButton jButton2 = new JButton(取消 )。 JFrame frame = new JFrame(学生家教注册添加 )。 public static JTextArea jTextArea[] = new JTextArea[9]。 public static void main(String[] args) { new Screen3()。 } public Screen3() { //创建构造方法初始化 screen3 (new GridLayout(10, 1, 10, 10))。 for (int i = 0。 i 9。 i++) { jPanel[i] = new JPanel()。 jTextArea[i] = new JTextArea(50, 50)。 jLabel[i] = new JLabel(bString[i])。 jPanel[i].add(jLabel[i])。 jPanel[i].add(jTextArea[i])。 jPanel[i].setLayout(new GridLayout(1, 2))。 (jPanel[i])。 } (new ActionHappen1())。 (new ActionHappen1())。 jPanel[8] = new JPanel()。 jPanel[8].add(jButton1, )。 jPanel[8].add(jButton2, )。 jPanel[8].setLayout(new GridLayout(1, 2))。 (jPanel[8])。 //对 screen3 窗口进行布局管理 (true)。 (28, 28, 700, 600)。 (700,600)。 ()。 (true)。 } public class ActionHappen1 implements ActionListener { public void actionPerformed(ActionEvent e) { String name = ()。 if (确认添加 .equals(name)) { //获取窗口中各项文本框的内容,创建一个 teachers 对象 Teachers teachers = new Teachers(jTextArea[0].getText(), jTextArea[1].getText(), jTextArea[2].getText(), jTextArea[3].getText(), (jTextArea[4].getText(), 10), (jTextArea[5].getText(), 10), ( [6].getText(), 10), 10 * ((jTextArea[4].getText(), 10) + ([5] .getText(), 10) ( jTextArea[6].getText(), 10)), new ().toString())。 //调用 DBUtil 中的添加方法添加新成员的各项业务信息栏 if ((teachers) amp。 amp。 (teachers)) { new Screen7()。 } else { new Screen6()。 new Screen3()。 } } else if (取消 .equals(name)) { new Screen()。 } } } } ( 5) Screen4 package JM。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 public class Screen4 { JLabel jLabel[] = new JLabel[6]。 JPanel jPanel[] = new JPanel[7]。 String bString[] = {姓名: ,所在大学 ,当日上班 ,当日加班: ,当日早退迟到: ,时间: }。 JButton jButton1 = new JButton(确认 )。 JButton jButton2 = new JButton(返回 )。 JFrame frame = new JFrame(家教当日情况 )。 public static JTextArea jTextArea[] = new JTextArea[7]。 //创建构造方法初始 化 screen4 public Screen4(String n5) { (new GridLayout(7,1,10,10))。 for (int i = 0。 i 6。 i++) { jPanel[i] = new JPanel()。 jTextArea[i] = new JTextArea(50, 50)。 jLabel[i] = new JLabel(bString[i])。 jPanel[i].add(jLabel[i])。 jPanel[i].add(jTextArea[i])。 jPanel[i].setLayout(new GridLayout(1,2))。 (jPanel[i])。 } //调用 DButil1 中 find2()方法获取员工在数据库中的内容,然后创建一个Mteacher 对象 Mteacher mteacher = (n5)。 jTextArea[0].setText( 姓名 ())。 jTextArea[1].setText( 所在大学 ())。 jTextArea[2].setText( 当日家教 ()+)。 jTextArea[3].setText(+ 当日附加 ())。 jTextArea[4].setText(+ 当日缺勤 ())。 jTextArea[5].setText(new ().toString())。 (new ActionHappen1())。 (new ActionHappen1())。 jPanel[6] = new JPanel()。 jPanel[6].add(jButton1,)。 jPanel[6].add(jButton2,)。 jPanel[6].setLayout(new GridLayout(1, 2))。 (jPanel[6])。 //对 screen5 窗口进行布局管理 (true)。 (28, 28, 700, 600)。 (700,600)。 ()。 (true)。 } //新建监听类实现接口,给窗口中的按钮添加监听 public class ActionHappen1 implements ActionListener { public void actionPerformed(ActionEvent e) { String name = ()。 if(确认 .equals(name)){ //获取窗口中各项文本框对应内容,创建一个 Mteacher Mteacher job = new Mteacher(jTextArea[0].getText(), jTextArea[1].getText(), (jTextArea[2].getText(),10),(jTextArea[3].getText(),10), (jTextArea[4].getText(),10), new ().toString())。 if((job,jTextArea[0].getText())amp。 amp。 (job)) //调用 DButil1 中 update1 方法将员工在数据库当中的内容进行更新 //调用 DButil1 中 insert1()方法将员工当日的工作情况记录到数据库中 new Screen7()。 }else if (返回 .equals(name)) { new Screen()。 } } } } ( 6) Screen6 package JM。 import。 import。 import。 import。 import。 import。 import。 import。 import。 public class Screen6 { JFrame frame = new JFrame(验证。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。