-
大小: 858.41 KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2024-08-05
- 語言: Java
- 標(biāo)簽: java??報(bào)告??課程設(shè)計(jì)??軟件工程??
資源簡介
軟件工程課程設(shè)計(jì)報(bào)告--java學(xué)生管理系統(tǒng),其中包括完整的源代碼,是一個(gè)很好的課程設(shè)計(jì)報(bào)告,大家可以下載下來參考學(xué)習(xí),是學(xué)習(xí)Swing的一個(gè)相當(dāng)好的例子。
代碼片段和文件信息
import?java.awt.*;
import?java.awt.event.*;
import?javax.swing.*;
import?java.sql.*;
import?java.util.*;
public?class?AddAdminframe?extends?Jframe{
private?JTextField?tfUserpassword;
????private?String?tfUser1password1;????
static?final?String?JDBC_DRIVER=“sun.jdbc.odbc.JdbcOdbcDriver“;
static?final?String?DATAbase_URL=“jdbc:odbc:studyDSN“;
private?Connection?connection;
private?Statement?statement;
String?sqlInsert;
public?AddAdminframe(){
super(“新帳戶添加“);
//???????Jframe?frame?=?new?Jframe(“新帳戶添加“);
try
{
Class.forName(JDBC_DRIVER);
connection?=?DriverManager.getConnection(DATAbase_URL“sa““8882551“);
statement?=?connection.createStatement();
}
catch(SQLException?sqlException)
{
JOptionPane.showMessageDialog(nullsqlException.getMessage()“Database?Error“JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
catch(ClassNotFoundException?classNotFound)
{
JOptionPane.showMessageDialog(nullclassNotFound.getMessage()“Driver?Not?Found“JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
Box?horizontal1=Box.createHorizontalBox();
Box?horizontal2=Box.createHorizontalBox();
Box?horizontal3=Box.createHorizontalBox();
Box?horizontal4=Box.createHorizontalBox();
Box?horizontal5=Box.createHorizontalBox();
Box?horizontal6=Box.createHorizontalBox();
Box?horizontal7=Box.createHorizontalBox();
Box?vertical1=Box.createVerticalBox();
Box?vertical2=Box.createVerticalBox();
Container?container=getContentPane();
container.setLayout(new?FlowLayout());
JLabel?lbtitle=new?JLabel(“新帳戶添加“);
lbtitle.setFont(new?Font(““Font.BOLD18));
horizontal1.add(lbtitle);
JLabel?lbUser3=new?JLabel(“????“);
horizontal7.add(lbUser3);
horizontal7.setSize(30015);
//container.add(lbtitle);
JLabel?lbUser=new?JLabel(“用戶名:“);
horizontal2.add(lbUser);
//container.add(lbUser);
final?JTextField?tfUser=new?JTextField(10);
horizontal2.add(tfUser);
//container.add(tfUser);
JLabel?lbUser2=new?JLabel(“????“);
horizontal6.add(lbUser2);
horizontal6.setSize(30015);
JLabel?lbpassword=new?JLabel(“密碼:“);
horizontal3.add(lbpassword);
//container.add(lbpassword);
final?JPasswordField?password=new?JPasswordField(10);
horizontal3.add(password);
vertical1.add(horizontal7);
vertical1.add(horizontal2);
vertical1.add(horizontal6);
vertical1.add(horizontal3);
JLabel?lbUser1=new?JLabel(“????“);
horizontal5.add(lbUser1);
horizontal5.setSize(30015);
//container.add(password);
/*添加按鈕監(jiān)聽*/
JButton?InButton=new?JButton(“添加“);
horizontal4.add(InButton);
InButton.addActionListener(
new?ActionListener()
{
public?void?actionPerformed(ActionEvent?event)
{
??????????
???????????tfUser1=tfUser.getText();
???????????password1=password.getText(); ???????????
???????????addAdmin(tfUser1password1); ????????????? ???????????
}
}
);
JLabel?lbUser5=new?JLabel(“????“
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????1086??2007-07-19?19:32??SIMS源代碼\AddAdminfr
?????文件????????804??2007-07-19?19:32??SIMS源代碼\AddAdminfr
?????文件???????4373??2007-07-19?19:32??SIMS源代碼\AddAdminfr
?????文件???????4667??2007-07-19?19:32??SIMS源代碼\AddAdminfr
?????文件????????525??2007-07-19?19:34??SIMS源代碼\AddStudentfr
?????文件????????601??2007-07-19?19:34??SIMS源代碼\AddStudentfr
?????文件????????498??2007-07-19?19:34??SIMS源代碼\AddStudentfr
?????文件???????3920??2007-07-19?19:34??SIMS源代碼\AddStudentfr
?????文件???????3434??2007-07-19?19:34??SIMS源代碼\AddStudentfr
?????文件???????1054??2007-07-19?16:41??SIMS源代碼\AdminStudentfr
?????文件????????538??2007-07-19?16:41??SIMS源代碼\AdminStudentfr
?????文件????????541??2007-07-19?16:41??SIMS源代碼\AdminStudentfr
?????文件????????541??2007-07-19?16:41??SIMS源代碼\AdminStudentfr
?????文件???????1971??2007-07-19?16:41??SIMS源代碼\AdminStudentfr
?????文件???????2052??2007-07-19?16:38??SIMS源代碼\AdminStudentfr
?????文件????????219??2008-04-18?16:01??SIMS源代碼\checkException.class
?????文件????????559??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件????????637??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件????????558??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件???????1850??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件????????528??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件???????5474??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件???????6864??2007-07-19?22:45??SIMS源代碼\ConditionStudentfr
?????文件???????2391??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
?????文件????????658??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
?????文件???????1873??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
?????文件????????736??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
?????文件????????503??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
?????文件???????4365??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
?????文件???????6888??2007-07-19?17:10??SIMS源代碼\DeleteAdminfr
............此處省略57個(gè)文件信息
評論
共有 條評論