电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

学生管理系统(图形界面)——Java

学生管理系统(图形界面)——Java_第1页
1/19
学生管理系统(图形界面)——Java_第2页
2/19
学生管理系统(图形界面)——Java_第3页
3/19
学生管理系统(图形界面)——Java 源代码: package exp10; import javax.swing.JFrame; public class MainClass { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub JFrame myFrame=new JFrame("学生成绩管理系统"); myFrame.setLocation(300,100); // myFrame.setContentPane(new LoginPane(myFrame)); myFrame.pack(); myFrame.setVisible(true); } } package exp10; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class DataBase { Connection conn=null; public Connection getConn(){ return this.conn; } public void setConn(Connection conn){ this.conn=conn; } public boolean getConnection(){ String url="jdbc:mysql://localhost:3306/ScoreManagement?user=root&password=123"; try{ Class.forName("org.gjt.mm.mysql.Driver"); conn=DriverManager.getConnection(url); return true; }catch(SQLException e){ System.out.println(e.getMessage()); return false; } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } } public ResultSet executeQuery(String sql){ ResultSet rs=null; Statement stmt=null; if(conn==null){ this.getConnection();} try{ stmt=conn.createStatement(); rs=stmt.executeQuery(sql); return rs; }catch(SQLException e){ return null; } } public int executeUpdate(String sql){ Statement stmt=null; int linecount=0; if(conn==null){ this.getConnection();} try{ stmt=conn.createStatement(); linecount=stmt.executeUpdate(sql); }catch(SQLException e){} return linecount; } } package exp10; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.Box; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; impor...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

学生管理系统(图形界面)——Java

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部