java成绩管理界面代码 java编写学生成绩管理系统各科成绩( 二 )


});
JButton btn2 = new JButton("查询学生学籍信息");
btn2.setForeground(Color.blue);
btn2.setSize(200, 38);
btn2.setLocation(135, 300);
btn2.setFont(font);
btn2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Stmessege1 f;
try {
f = new Stmessege1();
f.Stmessege11();
m.setVisible(true);
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
JButton btn3 = new JButton("删除");
btn3.setForeground(Color.blue);
btn3.setSize(80, 38);
btn3.setLocation(350, 300);
btn3.setFont(font);
btn3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
new 删除();
//f.setVisible(false);
m.setVisible(true);
}
});
JButton btn4 = new JButton("更新");
btn4.setForeground(Color.blue);
btn4.setSize(80, 38);
btn4.setLocation(200, 230);
btn4.setFont(font);
btn4.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
new 更新();
m.setVisible(true);
}
});
m.add(l0);
m.add(l1);
m.add(tf1);
m.add(l2);
m.add(tf2);
m.add(l3);
m.add(tf3);
m.add(l4);
m.add(tf4);
m.add(l5);
m.add(tf5);
m.add(l6);
m.add(tf6);
m.add(l7);
m.add(tf7);
m.add(btn1);
m.add(btn2);
m.add(btn3);
m.add(btn4);
m.setVisible(true);
}
public static void main(String[] args) {
new Stmessege();
}
}
可以仿照java成绩管理界面代码我java成绩管理界面代码的做一下java成绩管理界面代码,希望采纳java成绩管理界面代码,我才一级哦
求一个用java写的学生成绩管理信息系统的源代码,要求有界面,能实现以下方法实现了用户界面登陆
import java.awt.*;
import java.awt.event.*;
public class DengLuJieMian extends Frame implements ActionListener
{
Label username=new Label("用户名:");//使用文本创建一个用户名标签
TextField t1=new TextField();//创建一个文本框对象
Label password=new Label("密码:");//创建一个密码标签
TextField t2=new TextField();
Button b1=new Button("登陆");//创建登陆按钮
Button b2=new Button("取消");//创建取消按钮
public DengLuJieMian()
{
this.setTitle("学生信息管理系统");//设置窗口标题
this.setLayout(null);//设置窗口布局管理器
username.setBounds(50,40,60,20);//设置姓名标签的初始位置
this.add(username);// 将姓名标签组件添加到容器
t1.setBounds(120,40,80,20);// 设置文本框的初始位置
this.add(t1);// 将文本框组件添加到容器
password.setBounds(50,100,60,20);//密码标签的初始位置
this.add(password);//将密码标签组件添加到容器
t2.setBounds(120,100,80,20);//设置密码标签的初始位置
this.add(t2);//将密码标签组件添加到容器
b1.setBounds(50,150,60,20);//设置登陆按钮的初始位置
this.add(b1);//将登陆按钮组件添加到容器
b2.setBounds(120,150,60,20);//设置取消按钮的初始位置
this.add(b2);// 将取消按钮组件添加到容器
b1.addActionListener(this);//给登陆按钮添加监听器
b2.addActionListener(this);// 给取消按钮添加监听器
this.setVisible(true);//设置窗口的可见性
this.setSize(300,200);//设置窗口的大小
addWindowListener(new WindowAdapter()

推荐阅读