JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx

上传人:b****1 文档编号:15329524 上传时间:2022-10-29 格式:DOCX 页数:57 大小:144.88KB
下载 相关 举报
JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx_第1页
第1页 / 共57页
JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx_第2页
第2页 / 共57页
JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx_第3页
第3页 / 共57页
JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx_第4页
第4页 / 共57页
JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx_第5页
第5页 / 共57页
点击查看更多>>
下载资源
资源描述

JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx

《JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx(57页珍藏版)》请在冰豆网上搜索。

JAVA课程设计基于UI的图书管理系统Word格式文档下载.docx

2.MainMenu、Regsdit类是系统登陆界面和用户注册界面。

3.MainCl类是系统的主要界面。

4.Insert、Look、Update、Delete、Sendbook、Backbook类分别用来进行图书插入、图书信息查看、图书信息修改、图书删除、借阅图书、归还图书。

5.程序代码

Access类

packageaccess;

importjava.sql.*;

importjavax.swing.JLabel;

importjavax.swing.JPanel;

importjavax.swing.JTextField;

importview.*;

publicclassAccess{

Connectionconn=null;

Statementstmt=null;

ResultSetrs=null;

PreparedStatementps=null;

Stringusername;

Stringtemp;

Stringpassword;

Stringbookname;

Stringbookid;

Stringauthor;

Stringpublisher;

Stringname;

intcount;

JTextFieldtest;

JTextFieldtest1;

JLabeljLabel;

JPaneljpane;

intresult=0;

publicAccess(Stringusername,Stringpassword){

this.username=username;

this.password=password;

try{

Class.forName("

sun.jdbc.odbc.JdbcOdbcDriver"

);

Stringstrurl="

jdbc:

odbc:

driver={MicrosoftAccessDriver(*.mdb)};

DBQ=D:

\\workspace\\bookmis.mdb"

;

conn=DriverManager.getConnection(strurl);

stmt=conn.createStatement();

}catch(Exceptione){

}

}

publicAccess(Stringbookname,Stringbookid,Stringauthor,Stringpublisher,JTextFieldtest){

this.bookname=bookname;

this.bookid=bookid;

this.author=author;

this.publisher=publisher;

this.test=test;

publicAccess(Stringbookname,Stringbookid,Stringauthor,Stringpublisher,JLabeljlabel){

this.jLabel=jlabel;

publicAccess(){

publicAccess(Stringtemp,JTextFieldtest1){

this.temp=temp;

this.test1=test1;

publicAccess(Stringaname,JPaneljpane,JLabeljLabel){

name=aname;

this.jpane=jpane;

this.jLabel=jLabel;

publicAccess(Stringaname,JLabeljLabel){

publicvoidregsdit(){

result=stmt.executeUpdate("

insertintouserinform(username,password)values('

"

+username+"

'

'

+password+"

)"

}catch(SQLExceptione){

//TODO自动生成catch块

newFail().getJDialog();

if(result==1){

MainMenumainmenu=newMainMenu();

mainmenu.getJFrame();

}else{

publicvoidlogin(){

rs=stmt.executeQuery("

select*fromuserinformwhereusername='

andpassword='

if(rs.next())

{

MainClmaincl=newMainCl();

maincl.getJFrame();

}

else{

LoginFailloginfail=newLoginFail();

loginfail.getJDialog();

e.printStackTrace();

publicvoidinsert(){

insertintobookmis(bookname,num,auther,publisher)values('

+bookname+"

+bookid+"

+author+"

+publisher+"

if(result==1){

test.setText("

插入成功"

elsetest.setText("

插入失败"

pu

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销 > 公共行政管理

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

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