ImageVerifierCode 换一换
格式:DOCX , 页数:48 ,大小:1.04MB ,
资源ID:21164338      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/21164338.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(012221宋君易实验设计五教务处管理系统文档格式.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

012221宋君易实验设计五教务处管理系统文档格式.docx

1、(2)主要软件:操作系统可为Windows9X、WinMe、Win2000或更高版本等;开发环境为jdk或者jcreator。(3)参考书目:尹继平,张帆.java范例大全.机械工业出版社施霞萍.java程序设计教程.机械工业出版社 5. 实验方法与步骤:程序截图:登陆界面可以显示当前时间输入用户名密码每个账号都有自己的权限,不能进入非授权表登陆学生档案管理系统可查询信息可添加新行,通过回车就可保存数据登陆教师档案管理系统可删除信息退出系统程序流程图6. 实验总结: 通过这次课程设计我掌握了Java与数据库的连接,并且实现了通过Java进行新建、查询、删除、修改操作,并通过制作界面,对Java

2、界面的设计也有了更深的理解,在课设中虽然遇到了许多问题与困难,但是通过自己的研究与同学的帮助,最终成功完成了课设,积累了很多设计经验,为以后的学习打下了良好的基础。附录:登陆界面源代码:/* * To change this template, choose Tools | Templates * and open the template in the editor. */package SQL;import java.awt.Component;import java.text.ParsePosition;import java.text.SimpleDateFormat;import j

3、ava.util.Calendar;import java.util.Date;import javax.swing.JFrame;import javax.swing.JOptionPane;import java.sql.*;import java.util.*;import java.util.logging.*;import javax.swing.*;import javax.swing.event.*;import javax.swing.table.*;class VeDate /* * 根据一个日期,返回是星期几的字符串 * * param sdate * return pub

4、lic static String getStringDate() Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat(yyyy-MM-dd HH:mm:ss); String dateString = formatter.format(currentTime); return dateString; public static Date strToDate(String strDate) yyyy-MM-dd ParsePosition pos = new ParsePosition

5、(0); Date strtodate = formatter.parse(strDate, pos); return strtodate; public static String getWeek(String sdate, String num) / 再转换为时间 Date dd = VeDate.strToDate(sdate); Calendar c = Calendar.getInstance(); c.setTime(dd); if (num.equals(1) / 返回星期一所在的日期 c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); e

6、lse if (num.equals(2) / 返回星期二所在的日期 c.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);3) / 返回星期三所在的日期 c.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);4) / 返回星期四所在的日期 c.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);5) / 返回星期五所在的日期 c.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);6) / 返回星期六所在的日期 c.set(Calendar.

7、DAY_OF_WEEK, Calendar.SATURDAY);0) / 返回星期日所在的日期 c.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); return new SimpleDateFormat().format(c.getTime(); public static String getWeek(String sdate) Date date = VeDate.strToDate(sdate); c.setTime(date); / int hour=c.get(Calendar.DAY_OF_WEEK); / hour中存的就是星期几了,其范围

8、 17 / 1=星期日 7=星期六,其他类推EEEE public static String getWeekStr(String sdate) String str = ; str = VeDate.getWeek(sdate); if (.equals(str) str = 星期日 else if (星期一星期二星期三星期四星期五7星期六 return str;/*/public class login extends javax.swing.JFrame * Creates new form login String connectionUrl = jdbc:sqlserver:/loc

9、alhost:2159;databaseName=学生教师档案;user=sa;password=otakulee123; public login() initComponents(); jLabel5.setText(VeDate.getStringDate(); jLabel6.setText(VeDate.getWeekStr(VeDate.getStringDate(); try /获取驱动,这里使用的是 sqljdbc_1.2.2828.100_chs.exe,不同版本的驱动,语句有所不同 Class.forName(com.microsoft.sqlserver.jdbc.SQL

10、ServerDriver catch (ClassNotFoundException ex) Logger.getLogger(StudentSQL.class.getName().log(Level.SEVERE, null, ex); ImageIcon img = new ImageIcon(C:Documents and SettingsAdministrator桌面桌面君红色桌面君素材sc120115_11a.jpg JLabel backlabel = new JLabel(img); getLayeredPane().add(backlabel, new Integer(Inte

11、ger.MIN_VALUE); backlabel.setBounds(0, 0, 580, 352); (JPanel) this.getContentPane().setOpaque(false);/设置为透明(opaque的意思为不透明) this.setLocationRelativeTo(null); * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is a

12、lways * regenerated by the Form Editor. SuppressWarnings(unchecked) / private void initComponents() jButton1 = new javax.swing.JButton(); jTextField1 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jButton2 =

13、 new javax.swing.JButton(); jComboBox1 = new javax.swing.JComboBox(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jPasswordField1 = new javax.swing.JPasswordField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); s

14、etResizable(false); jButton1.setText(登陆 jButton1.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent evt) jButton1ActionPerformed(evt); ); jTextField1.addActionListener(new java.awt.event.ActionListener() jTextField1ActionPerformed(evt); jLabe

15、l1.setText(用户名: jLabel2.setText(密码: jLabel3.setFont(new java.awt.Font(微软雅黑, 1, 24); / NOI18N jLabel3.setText(教务处管理系统登陆界面 jButton2.setText(退出 jButton2.addActionListener(new java.awt.event.ActionListener() jButton2ActionPerformed(evt); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new Strin

16、g 学生档案管理系统, 教师档案管理系统 ); jComboBox1.addActionListener(new java.awt.event.ActionListener() jComboBox1ActionPerformed(evt); jLabel4.setText(选择登陆: jLabel5.setText(11111 jLabel6.setText( javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane(); getContentPane().setLayout(layout); lay

17、out.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jLabel6) .addGap(0, 0, Short.

18、MAX_VALUE) .addGap(165, 165, 165) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel4) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGrou

19、p(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jComboBox1, 0, 144, Short.MAX_VALUE) .addComponent(jPasswordField1) .addContainerGap() .addGap(157, 157, 157) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButton1) .addGap(30, 30,

20、 30) .addComponent(jButton2) .addGap(199, 199, 199) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 298, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(115, 115, 115) .addComponent(jLabel1) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayou

21、t.PREFERRED_SIZE) .addGap(182, 182, 182) ); layout.setVerticalGroup( .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

22、 .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,

23、 javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4) .addGap(34, 34, 34) .addComponent(jButton2) .addComponent(jLabel6) pack(); / private void jButton1Act

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1