资源简介
java 学生成绩管理系统 源代码
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.lang.*;
public class Students.java extends Applet implements ActionListener
{
Vector StuInf=new Vector();
StudentInf SI;
String xm;
String bj;
int i,j,xh,cj;
static int mid;
Label prompt1=new Label("学生成绩管理系统");
Label prompt2=new Label(" 用户:");
Label prompt3=new Label(" 密码:");
Label prompt4=new Label(" 班级:");
Label prompt5=new Label(" 成绩:");
TextField input1=new TextField(8);
TextField input2=new TextField(8);
TextField input3=new TextField(8);
TextField input4=new TextField(8);
Button btn1=new Button("登录");
Button btn2=new Button("增加");
Button btn3=new Button("修改");
Button btn4=new Button("删除");
代码片段和文件信息
import java.applet.applet;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.lang.*;
public class Students.java extends applet implements ActionListener
{
Vector StuInf=new Vector();
StudentInf SI;
String xm;
String bj;
int ijxhcj;
static int mid;
Label prompt1=new Label(“学生成绩管理系统“);
Label prompt2=new Label(“ 用户:“);
Label prompt3=new Label(“ 密码:“);
Label prompt4=new Label(“ 班级:“);
Label prompt5=new Label(“ 成绩:“);
TextField input1=new TextField(8);
TextField input2=new TextField(8);
TextField input3=new TextField(8);
TextField input4=new TextField(8);
Button btn1=new Button(“登录“);
Button btn2=new Button(“增加“);
Button btn3=new Button(“修改“);
Button btn4=new Button(“删除“);
public void init()
{
setLayout(new GridLayout(63));
add(new Label());
add(prompt1);
add(new Label());
add(prompt2);
add(input1);
add(new Label());
add(prompt3);
add(input2);
add(btn1);
add(prompt4);
add(input3);
add(new Label());
add(prompt5);
add(input4);
add(new Label());
add(btn2);
add(btn3);
add(btn4);
prompt4.setVisible(false);
prompt5.setVisible(false);
input3.setVisible(false);
input4.setVisible(false);
btn2.setVisible(false);
btn3.setVisible(false);
btn4.setVisible(false);
btn1.addActionListener(this);
btn2.addActionListener(this);
btn3.addActionListener(this);
btn4.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand()==“登录“)
{
String ab;
a=input1.getText();
b=input2.getText();
input1.setText(““);
if((a.equals(“12“)==true)&&(b.equals(“12“)==true))
{
prompt2.setText(“ 姓名:“);
prompt3.setText(“ 学号:“);
prompt4.setVisible(true);
prompt5.setVisible(true);
input3.setVisible(true);
input4.setVisible(true);
btn2.setVisible(true);
btn3.setVisible(true);
btn4.setVisible(true);
btn3.setEnabled(false);
btn4.setEnabled(false);
btn1.setLabel(“查询“);
input1.setText(“登录成功“);
input1.selectAll();
}
else
input2.setText(“用户名或密码错“);
}
if(e.getActionCommand()==“增加“)
{
boolean scucss=true;
try
{
XingMing();
}
catch(EmptyException as)
{
input1.setText(“姓名不能为空“);
scucss=false;
}
try
{
xh=Integer.parseInt(input2.getText());
}
catch(NumberFormatException m)
{
input2.setText(“学号为空或格式错“);
scucss=false;
}
bj=input3.getText();
try
{
ChengJi();
}
catch(EmptyException as)
{
cj=-1;
}
catch(OverException dd)
{
input4.setText(“应在0-100间“);
scucss=false;
}
catch(NumberFormatException cm)
{
input4.setText(“成绩应为数据“);
scucss=false;
}
if(scucss==true)
{
SI=new StudentInf(xmxhbjcj);
Insert(SI);
}
}
if(e.getActionCommand()==“修改“)
{
xm=input1.getText();
xh=Integer.pars
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6534 2009-10-14 18:04 9.java
----------- --------- ---------- ----- ----
6534 1
- 上一篇:超市管理系统后台模板
- 下一篇:fastjson-1.2.6.jar
相关资源
- JavaFx 2.X 记事本
- 《Java Web从入门到精通》 明日科技 随
- java反弹球的程序
- java2word.jar
- java学生管理系统 源代码和实验报告
- Java 实现24点游戏
- 用Java实现的宾馆客房管理系统包含课
- javafx贪吃蛇
- java 类的相关代码
- JAVA邮件DEMO+邮件服务器.zip
- 飞行射击类游戏完整源码及素材(J
- 华容道完整源码及素材(Java实现)
- 推箱子带音乐版完整源码及素材Java实
- Java版连连看游戏完整源码+素材
- Java版拼图游戏完整源码+素材
- Java 操作Excel
-
Jfr
ame实现可运行jar包发送邮件 - 韩顺平所有视频教程(全)
- 关于JAVA中事件分发和监听机制实现的
- javacv platform 1.4.1
- 疯狂Java讲义
- Java 面向对象编程.pdf
- javaSwingQQ登录界面
- 二分类logistc模型的实现java、matlab代码
- Java设计模式-32讲视频干货
- java外文翻译
- bp神经网络对数据分类的实现java代码
- 用Java语言编写简易学生管理系统
- 使用javafx2搭建简单客户端嵌入浏览器
- 加密安全的java即时通信系统
评论
共有 条评论