資源簡介
對倉庫物品進行增刪改查,涉及權限管理
SQL2000數據庫 解壓后導入調試即可 保證無錯誤

代碼片段和文件信息
package?depot;
import?java.awt.BorderLayout;
import?java.awt.event.MouseAdapter;
import?java.awt.event.MouseEvent;
import?java.sql.*;
import?javax.swing.*;
import?javax.swing.table.TableModel;
import?com.sun.org.apache.regexp.internal.recompile;
public?class?adduser?{
???String?name=new?contain().name();
???JInternalframe?jif=null;
???TableModel?model=null;
???JTable?jt=null;
???JScrollPane?jsp=null;
???JPanel?jp1=null;
???JButton?jb1=null;
???JTextField?jt1=null;
???JTextField?jt2=null;
???JLabel?jl1=null;
???JLabel?jl2=null;
???public?JInternalframe?ful(){
???model=new?selectuse().ful();
???jt=new?JTable();
???jt.setModel(model);
???jsp=new?JScrollPane(jt);
???jb1=new?JButton(“確認“);
???jt1=new?JTextField(18);
???jt2=new?JPasswordField(18);
???jp1=new?JPanel();
???jl1=new?JLabel(“用戶名“);
???jl2=new?JLabel(“?密碼“);
???jif=new?JInternalframe(“增加用戶“truetruetrue);
???jp1.add(jl1);
???jp1.add(jt1);
???jp1.add(jl2);
???jp1.add(jt2);
???jp1.add(jb1);
???jif.add(jp1BorderLayout.SOUTH);
???jif.add(jspBorderLayout.NORTH);
???
???action();
???
???jif.setSize(300?300);
???jif.setVisible(true);
???return?jif;
???}
???
???public?void?action(){
???jb1.addMouseListener(new?MouseAdapter(){
@Override
public?void?mouseClicked(MouseEvent?e)?{
//?TODO?Auto-generated?method?stub
super.mouseClicked(e);
if(name.equals(“root“)){
Connection?conn=new?conn().con();
Statement?st=null;
String?sql=“insert?into?man?values(“+“‘“+jt1.getText()+“‘‘“+jt2.getText()+“‘)“;
System.out.println(sql);
try?{
st=conn.createStatement();
st.executeUpdate(sql);
jt.setModel(new?selectuse().ful());
st.close();
conn.close();
}?catch?(SQLException?e1)?{
//?TODO?Auto-generated?catch?block
e1.printStackTrace();
JOptionPane.showMessageDialog(null?“你輸入的用戶已經存在“);
}
}
}
???
???});
???}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????288??2011-03-19?15:03??depot11\.classpath
?????文件????????381??2011-03-14?20:23??depot11\.project
?????文件????1048576??2011-03-28?17:38??depot11\depot_Data.MDF
?????文件????1048576??2011-03-28?17:38??depot11\depot_log.LDF
?????文件?????410422??2011-03-16?11:53??depot11\ms_sql2k_jdbc.jar
?????文件???????2213??2011-03-22?14:28??depot11\bin\depot\adduser$1.class
?????文件???????2350??2011-03-22?14:28??depot11\bin\depot\adduser.class
?????文件???????1155??2011-03-21?20:30??depot11\bin\depot\conn.class
?????文件????????776??2011-03-28?17:32??depot11\bin\depot\contain$1.class
?????文件????????708??2011-03-28?17:32??depot11\bin\depot\contain$2.class
?????文件???????1308??2011-03-28?17:32??depot11\bin\depot\contain$3.class
?????文件???????1312??2011-03-28?17:32??depot11\bin\depot\contain$4.class
?????文件????????962??2011-03-28?17:32??depot11\bin\depot\contain$5.class
?????文件????????951??2011-03-28?17:32??depot11\bin\depot\contain$6.class
?????文件????????941??2011-03-28?17:32??depot11\bin\depot\contain$7.class
?????文件????????927??2011-03-28?17:32??depot11\bin\depot\contain$8.class
?????文件???????3542??2011-03-28?17:32??depot11\bin\depot\contain.class
?????文件???????2569??2011-03-28?17:36??depot11\bin\depot\deleteuse$1.class
?????文件???????1956??2011-03-28?17:36??depot11\bin\depot\deleteuse.class
?????文件???????2675??2011-03-28?17:27??depot11\bin\depot\gooddelete$1.class
?????文件???????1802??2011-03-28?17:27??depot11\bin\depot\gooddelete.class
?????文件????????944??2011-03-28?17:31??depot11\bin\depot\goodselect$1.class
?????文件????????944??2011-03-28?17:31??depot11\bin\depot\goodselect$2.class
?????文件????????698??2011-03-28?17:31??depot11\bin\depot\goodselect$3.class
?????文件????????697??2011-03-28?17:31??depot11\bin\depot\goodselect$4.class
?????文件????????955??2011-03-28?17:31??depot11\bin\depot\goodselect$5.class
?????文件???????5557??2011-03-28?17:31??depot11\bin\depot\goodselect.class
?????文件???????2838??2011-03-22?14:53??depot11\bin\depot\goodsmangener$1.class
?????文件????????792??2011-03-22?14:53??depot11\bin\depot\goodsmangener$2.class
?????文件???????3161??2011-03-22?14:53??depot11\bin\depot\goodsmangener.class
............此處省略36個文件信息
評論
共有 條評論