• 大小: 777KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: Java
  • 标签: 数据库  图书馆  系统  

资源简介

使用java+SQL 编写的JavaApplication 图书馆借还书系统 源代码……在netbeans中直接添加本项目即可……

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */

package com.bookclient.control;

import java.io.objectInputStream;
import java.io.objectOutputStream;
import java.net.Socket;

import javax.swing.JTable;

import com.common.Message;
import com.common.MyTable;

public class ConnectServer{//连接服务器传送对象流信息
Message ms=null;
private Socket s=null;
public ConnectServer(Message mes){
this.ms=mes;
try{
s=new Socket(“192.168.111.222“8888);//连接服务器注意服务器IP地址固定
}catch(Exception e){
e.printStackTrace();
}
}
/**
 * 发送消息
 */
public void sendMessage(){//发送消息
try{
objectOutputStream oos=new objectOutputStream(s.getOutputStream());
oos.writeobject(ms);
oos.flush();
}catch(Exception e){
e.printStackTrace();
}
}
/**
 * 接收消息
 * @return
 */
public Message getMessage(){//获取回复消息
    Message ms1=null;
try{
objectInputStream ois=new objectInputStream(s.getInputStream());
ms1=(Message)ois.readobject();
}catch(Exception e){
e.printStackTrace();
}
return ms1;
}
/**
 * 关闭网络连接
 */
public void closeConnect(){ //关闭管道连接
try{
s.close();
}catch(Exception e){
e.printStackTrace();
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-06-22 19:28  JavaApplication\
     目录           0  2011-06-22 19:24  JavaApplication\build\
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\
     文件           0  2011-06-21 17:30  JavaApplication\build\classes\.netbeans_automatic_build
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookclient\
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookclient\control\
     文件        1636  2011-06-21 23:37  JavaApplication\build\classes\com\bookclient\control\ConnectServer.class
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookclient\model\
     文件         848  2011-06-21 23:37  JavaApplication\build\classes\com\bookclient\model\BorrowListModel.class
     文件         851  2011-06-21 23:37  JavaApplication\build\classes\com\bookclient\model\UserModel.class
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookclient\view\
     文件        4556  2011-06-21 23:37  JavaApplication\build\classes\com\bookclient\view\BookClientLogin.class
     文件       10998  2011-06-21 23:37  JavaApplication\build\classes\com\bookclient\view\ClientMain.class
     文件        6208  2011-06-21 23:37  JavaApplication\build\classes\com\bookclient\view\ClientRegister.class
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookserver\
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookserver\control\
     文件        1072  2011-06-22 19:09  JavaApplication\build\classes\com\bookserver\control\SocketServer.class
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookserver\model\
     文件         848  2011-06-21 23:37  JavaApplication\build\classes\com\bookserver\model\BorrowListModel.class
     文件         854  2011-06-21 23:37  JavaApplication\build\classes\com\bookserver\model\OweUserModel.class
     文件         851  2011-06-21 23:37  JavaApplication\build\classes\com\bookserver\model\UserModel.class
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\bookserver\view\
     文件       21441  2011-06-22 19:09  JavaApplication\build\classes\com\bookserver\view\ServerMain.class
     目录           0  2011-06-22 19:24  JavaApplication\build\classes\com\common\
     文件         828  2011-06-21 23:37  JavaApplication\build\classes\com\common\BookModel.class
     文件        5285  2011-06-21 23:37  JavaApplication\build\classes\com\common\Message.class
     文件         430  2011-06-21 23:37  JavaApplication\build\classes\com\common\MyTable.class
     文件        3743  2011-06-21 16:55  JavaApplication\build.xml
     目录           0  2011-06-22 19:24  JavaApplication\images\
     文件       44882  2010-11-25 12:46  JavaApplication\images\ClientRegister.jpg
............此处省略48个文件信息

评论

共有 条评论