• 大小: 93KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: Java
  • 标签: java+oracle  

资源简介

java+oracle 毕业设计 create table books ( ID number(3), BookName varchar2(20), Press varchar2(20), Author varchar2(20), PressDate Date, Price number(5,2), Com varchar2(20), books_count number(2), borrowed_count number(2), constraint ID_Contraint_PK primary key ( ID )); create sequence ID_Sequence; //******************************* create table bookBrowse ( ID number(3), StudentName varchar2(40), BookName varchar2(40), ReturnDate Date, BorrowDate Date, Com varchar2(40), Is_Returned char(2),//设置默认直为‘否’ constraint ID_BookBrowse_Containt primary key ( ID )); create sequence ID_Browse_Sequence; //************************************ create table UserTable( ID number(3), UserName varchar2(40), Password varchar2(40), Power varchar2(40), constraint ID_User_Containt primary key ( ID )); //****************************** create sequence ID_User_Sequence;

资源截图

代码片段和文件信息

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class BookAdd extends Jframe implements ActionListener
{
DatabaseManager db=new DatabaseManager();
ResultSet rs;
JPanel panel1panel2;
JLabel BookNameLabelPressNameLabel
       AuthorLabelAddressLabel
       PressDateLabelPriceLabelBookCountLabelCommentLabel;
JTextField BookNameTextFieldPressNameTextField
           AuthorTextFieldAddressTextField
           PressDateTextFieldPriceTextFieldBookCountTextFieldCommentTextField;
Container c;
JButton ClearBtnAddBtnExitBtn;
public BookAdd()
{
super(“添加书籍信息“);
c=getContentPane();
c.setLayout(new BorderLayout());
BookNameLabel=new JLabel(“名称“JLabel.CENTER);
PressNameLabel=new JLabel(“出版社“JLabel.CENTER);
AuthorLabel=new JLabel(“作者“JLabel.CENTER);
AddressLabel=new JLabel(“地址“JLabel.CENTER);
PressDateLabel=new JLabel(“出版日期“JLabel.CENTER);
PriceLabel=new JLabel(“价格“JLabel.CENTER);
BookCountLabel=new JLabel(“新书数目“JLabel.CENTER);
CommentLabel=new JLabel(“备注“JLabel.CENTER);
BookNameTextField=new JTextField(15);
PressNameTextField=new JTextField(15);
AuthorTextField=new JTextField(15);
AddressTextField=new JTextField(15);
PressDateTextField=new JTextField(15);
PriceTextField=new JTextField(15);
BookCountTextField=new JTextField(15);
CommentTextField=new JTextField(15);
panel1=new JPanel();
panel1.setLayout(new GridLayout(82));
panel1.add(BookNameLabel);
panel1.add(BookNameTextField);
panel1.add(PressNameLabel);
panel1.add(PressNameTextField);
panel1.add(AuthorLabel);
panel1.add(AuthorTextField);
panel1.add(AddressLabel);
panel1.add(AddressTextField);
panel1.add(PressDateLabel);
panel1.add(PressDateTextField);
panel1.add(PriceLabel);
panel1.add(PriceTextField);
panel1.add(BookCountLabel);
panel1.add(BookCountTextField);
panel1.add(CommentLabel);
panel1.add(CommentTextField);
panel2=new JPanel();
panel2.setLayout(new GridLayout(13));
ClearBtn=new JButton(“清空“);
ClearBtn.addActionListener(this);
AddBtn=new JButton(“添加“);
AddBtn.addActionListener(this);
ExitBtn=new JButton(“退出“);
ExitBtn.addActionListener(this);
panel2.add(ClearBtn);
panel2.add(AddBtn);
panel2.add(ExitBtn);
c.add(panel1BorderLayout.CENTER);
c.add(panel2BorderLayout.SOUTH);


}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==ExitBtn)
{
db.closeConnection();
this.dispose();
}
else if(e.getSource()==ClearBtn)
{
BookNameTextField.setText(““);
PressNameTextField.setText(““);
AuthorTextField.setText(““);
AddressTextField.setText(““);
PressDateTextField.setText(““);
PriceTextField.setText(““);
BookCountTextField.setText(““);
CommentTextField.setText(““);
}
else if(e.getSource()==AddBtn)
{
if(BookNameTextField.getText().trim().equals(““))
{
JOptionPane.showMessageDial

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     目录          0  2004-11-14 22:10  gh

     文件       1201  2004-11-09 23:20  gh\UserList.java.bak

     文件     204800  2004-11-04 12:53  gh\Librarybase.mdb

     文件        346  2004-11-09 11:00  gh\BorrowSituationList.class

     文件      11679  2004-11-14 22:08  gh\MainWindow.java

     文件      11685  2004-11-14 22:07  gh\MainWindow.java.bak

     文件       2569  2004-11-10 00:28  gh\UserLogin.java

     文件       2586  2004-11-10 00:27  gh\UserLogin.java.bak

     文件       1263  2004-11-09 09:34  gh\DatabaseManager.java

     文件       1239  2004-11-09 09:33  gh\DatabaseManager.java.bak

     文件       4143  2004-11-09 10:50  gh\BorrowInfo.java

     文件       4423  2004-11-09 08:43  gh\BookAdd.java

     文件       1522  2004-11-09 10:59  gh\DatabaseManager.class

     文件       4093  2004-11-09 10:50  gh\ReturnInfo.java

     文件       3445  2004-11-10 00:28  gh\UserLogin.class

     文件       4089  2004-11-09 10:49  gh\ReturnInfo.java.bak

     文件       3509  2004-11-07 21:00  gh\UserAdd.java

     文件       4422  2004-11-09 11:01  gh\BookAdd.class

     文件       3444  2004-11-10 00:29  gh\UserDelete.class

     文件       4357  2004-11-09 08:40  gh\BookAdd.java.bak

     文件       5066  2004-11-09 11:05  gh\BookModify.class

     文件       2073  2004-11-09 10:10  gh\BookDelete.java

     文件       3477  2004-11-07 20:58  gh\UserAdd.java.bak

     文件       3019  2004-11-09 11:03  gh\BookDelete.class

     文件       4383  2004-11-09 11:05  gh\BorrowBook.class

     文件       3673  2004-11-10 00:23  gh\UserModify.java.bak

     文件       4291  2004-11-09 11:01  gh\BorrowInfo.class

     文件       3654  2004-11-10 00:25  gh\UserModify.java

     文件       4311  2004-11-09 11:06  gh\ReturnBook.class

     文件       2534  2004-11-10 00:18  gh\UserDelete.java.bak

............此处省略28个文件信息

评论

共有 条评论