Java试验课题Word文档格式.docx
- 文档编号:17399579
- 上传时间:2022-12-01
- 格式:DOCX
- 页数:18
- 大小:455.61KB
Java试验课题Word文档格式.docx
《Java试验课题Word文档格式.docx》由会员分享,可在线阅读,更多相关《Java试验课题Word文档格式.docx(18页珍藏版)》请在冰豆网上搜索。
相关的图片资料"
相关的Flash动画"
8.你认为我们现有的课程中Flash动画"
动画太少"
对学习帮助不大"
对学习有一定的帮助"
9.你认为我们现在的课程讲解文字部分该作何改进?
简化内容,只保留提纲"
10.你认为现有课程的界面是否需要改进?
界面应更美观"
各课程的界面风格应统一"
newOtherPanel("
11.你认为在课程汇总使用各种媒体"
越多越好"
越少越好"
不用最好"
随便"
),
12.你认为现有课程左下方的栏目菜单是否需要改进?
很好,使用方便,不用改进"
简化内容即可"
菜单应更美观"
各个菜单的风格应该统一"
13.你认为对学习最有效的交流沟通方式是:
网上同学之间的交流"
面对面地与同学交流"
网上与专业教师交流"
14.你希望在教学中应用课题式教学、案例教学等模式吗?
是的"
不是的"
15.你是否希望在学习进程中能有更多机会经行网上自测,以检查自己的学习情况?
};
Containercp=getContentPane();
JPaneljp1=newJPanel();
JPaneljp=newJPanel();
JScrollPanejsp1=newJScrollPane(jp);
JPaneljp2=newJPanel();
JTextAreajta=newJTextArea(50,50);
JScrollPanejsp2=newJScrollPane(jta);
Buttonokbtn=newButton("
提交"
Buttoncanbtn=newButton("
取消"
publicDiaoCha(){
super("
问卷调查系统"
jp.setPreferredSize(newDimension(680,940));
jp.setLayout(null);
jp.add(headLab);
for(inti=1;
i<
16;
i++){
jp.add((JPanel)each[i]);
((JPanel)each[i]).setLocation(0,50*(i-1)+30);
}
jta.setWrapStyleWord(true);
jta.setLineWrap(true);
jta.setEditable(true);
jsp2.setBounds(10,800,500,100);
okbtn.setForeground(Color.BLUE);
canbtn.setForeground(Color.BLUE);
okbtn.setBounds(530,810,50,30);
canbtn.setBounds(530,860,50,30);
okbtn.addActionListener(this);
canbtn.addActionListener(this);
jp.add(jsp2);
jp.add(okbtn);
jp.add(canbtn);
add(jsp1);
headLab.setBounds(250,5,250,20);
headLab.setFont(newFont("
楷体"
Font.BOLD,20));
setVisible(true);
setResizable(false);
setBounds(340,100,730,600);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==okbtn){
Stringstr="
;
booleancanReturn=true;
try{
FileWriterfw=newFileWriter(newFile("
text1.txt"
));
BufferedWriterbfw=newBufferedWriter(fw);
for(inti=1;
30;
bfw.write('
'
}
bfw.write(headLab.getText(),0,headLab.getText().length());
bfw.newLine();
bfw.flush();
=15;
if(each[i]instanceofEachPanel){
((EachPanel)each[i]).getAnswer();
if(((EachPanel)each[i]).flag){
JOptionPane.showMessageDialog(this,"
您第"
+i+"
题未选择,无法提交"
错误"
JOptionPane.ERROR_MESSAGE);
canReturn=false;
}
if(canReturn){
for(inti=1;
if(each[i]instanceofEachPanel){
str=((EachPanel)each[i]).getAnswer();
}else{
str=((OtherPanel)each[i]).getAnswer();
}
bfw.write(str,0,str.length());
bfw.newLine();
bfw.flush();
bfw.newLine();
bfw.write("
建议:
0,"
.length());
intlen=jta.getText().length();
for(intstart=0;
start<
=len;
start=start+10){
bfw.write(jta.getText(),start,20);
bfw.flush();
bfw.close();
}catch(Exceptionee){}
if(canReturn){
JOptionPane.showMessageDialog(this,"
提交成功,谢谢您的参与!
(调查结果保持在本文件夹的Text1.txt中)"
提示"
JOptionPane.PLAIN_MESSAGE);
dispose();
}
}if(e.getSource()==canbtn){
JOptionPane.showMessageDialog(this,"
您取消了此次调查,系统将关闭,谢谢!
dispose();
//publicstaticvoidmain(Stringargs[]){
//newDiaoCha();
//}
}
packagemysql;
importjava.sql.*;
classLoginextendsJFrame
{
privatestaticfinallongserialVersionUID=1L;
privatestaticJFrameframe=newJFrame("
学生饭卡管理系统登录界面"
privateJButtonsubmit=newJButton("
登陆"
privateJButtonreset=newJButton("
重置"
privateJButtonassign=newJButton("
注册"
JLabelnameLab=newJLabel("
用户名:
privateJLabelpasswdLab=newJLabel("
密码:
privateJLabellab=newJLabel();
publicJTextFieldnameText=newJTextField(20);
publicJPasswordFieldpasswdText=newJPasswordField(20);
publicLogin(){}
publicvoidlogin(){
nameLab.setBounds(60,20,100,20);
passwdLab.setBounds(60,50,100,20);
lab.setBounds(100,90,200,20);
nameText.setBounds(120,20,100,20);
passwdText.setBounds(120,50,100,20);
submit.setBounds(120,120,100,30);
reset.setBounds(250,50,60,20);
assign.setBounds(250,20,60,20);
passwdText.setEchoChar('
*'
frame.add(nameLab);
frame.add(passwdLab);
frame.add(lab);
frame.add(nameText);
//用户名
frame.add(passwdText);
//用户密码
frame.add(submit);
frame.add(reset);
frame.add(assign);
frame.setSize(400,220);
frame.setLocation(400,250);
ImagePanelimg=newImagePanel();
img.setBounds(0,0,400,200);
frame.add(img);
frame.setVisible(true);
submit.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
@SuppressWarnings("
deprecation"
)
Stringpasswd=passwdText.getText();
Stringname=nameText.getText();
try{
ResultSetsqlRst=null;
Class.forName("
com.mysql.jdbc.Driver"
Connectionconn=DriverManager.getConnection("
jdbc:
mysql:
//localhost:
3306/test1"
root"
123456"
Statementst=conn.createStatement();
Stringsql="
select*fromuserwhereuserNo='
+name+"
'
andpasswd='
+passwd+"
sqlRst=st.executeQuery(sql);
if(sqlRst.next()){
newFankajiemain();
frame.dispose();
else{
lab.setForeground(Color.red);
lab.setText("
登陆失败!
密码或账号错误!
}
}catch(ClassNotFoundExceptione1){
e1.printStackTrace();
}catch(SQLExceptione1){
//TODOAuto-generatedcatchblock
}
});
assign.addActionListener(newActionListener(){//注册按钮,点击进入到第三层界面输入学号
frame.dispose();
newZhuce();
}
);
reset.addActionListener(newActionListener(){//重置按钮
nameText.setText("
//用户名重置
passwdText.setText("
//密码重置
publicstaticvoidmain(Stringargs[]){
Loginlog=newLogin();
log.login();
}
classImagePanelextendsJLabel{//构建一个图片容器
protectedvoidpaintComponent(Graphicsg)
super.paintComponent(g);
ImageIconimg=newImageIcon("
D:
\\Login.jpg"
g.drawImage(img.getImage(),0,0,this);
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
importjava.sql.Connection;
importjava.sql.DriverManager;
importjava.sql.SQLException;
importjava.sql.Statement;
classZhuce
privateJFramejrf=newJFrame("
注册窗口"
privateJLabeljla1=newJLabel("
privateJLabeljla2=newJLabel("
privateJLabeljla3=newJLabel("
确认密码:
privateJLabeljla4=newJLabel("
姓名:
privateJLabeljla5=newJLabel("
性别:
privateJLabeljla6=newJLabel("
年龄:
privateJLabeljla7=newJLabel("
生日:
privateJLabeljla8=newJLabel("
身份证:
privateJLabeljla9=newJLabel("
班级:
privateJLabeljla10=newJLabel("
学院:
privateJLabeljla13=newJLabel("
金额:
privateJLabeljla14=newJLabel("
余额:
privateJLabeljla11=newJLabel("
"
privateJLabeljla12=newJLabel("
xxxx-xx-xx"
//birth的格式
privateJTextFieldjtx1=newJTextField("
privateJTextFieldjtx2=newJTextField("
privateJTextFieldjtx3=newJTextField("
privateJTextFieldjtx4=newJTextField("
privateJTextFieldjtx5=newJTextField("
privateJTextFieldjtx6=newJTextField("
privateJTextFieldjtx7=newJTextField("
privateJTextFieldjtx8=newJTextField("
privateJTextFieldjtx9=newJTextField("
privateJTextFieldjtx10=newJTextField("
privateJTextFieldjtx13=newJTextField("
privateJTextFieldjtx14=newJTextField("
privateJButtonjbt=newJButton("
privateJButtonjbt1=newJButton("
返回"
Zhuce(){
Containercp=jrf.getContentPane();
//jrf.setBounds(500,200,300,300);
jla1.setBounds(40,20,100,20);
jla2.setBounds(40,60,100,20);
jla3.setBounds(40,100,100,20);
jla4.setBounds(40,140,100,20);
jla5.setBounds(40,180,100,20);
jla6.setBounds(40,220,100,20);
jla7.setBounds(40,260,100,20);
jla8.setBounds(40,300,100,20);
jla9.setBounds(40,340,100,20);
jla10.setBounds(40,380,100,20);
jla11.setBounds(120,500,150,20);
jla12.setBounds(270,260,100,20);
jla13.setBounds(40,420,100,20);
jla14.setBounds(40,460,100,20);
jtx1.setBounds(110,20,150,20);
jtx2.setBounds(110,60,150,20);
jtx3.setBounds(110,100,150,20);
jtx4.setBounds(110,140,150,20);
jtx5.setBounds(110,180,150,20);
jtx6.setBounds(110,220,150,20);
jtx7.setBounds(110,260,150,20);
jtx8.setBounds(110,300,150,20);
jtx9.setBounds(110,340,150,20);
jtx10.setBounds(110,380,150,20);
jtx13.setBounds(110,420,150,20);
jtx14.setBounds(110,460,150,20);
jbt.setBounds(90,550,80,30);
jbt1.setBounds(190,550,80,30);
cp.add(jla1);
cp.add(jla2);
cp.add(jla3);
cp
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Java 试验 课题
![提示](https://static.bdocx.com/images/bang_tan.gif)