6 模块分析
6.1 添加模块
学生信息添加部分代码: class charu extends JFrame implements ActionListener { JFrame frame = new JFrame("添加数据");
JPanel imagePanel;
ImageIcon bg;
Button sure;
TextField input1, input2, input3, input4, input5;
TextArea show;
Box box1, box2, box3, box4;
int k, s1, j;
Connection con;
Statement sql;
ResultSet rs;
charu() {
Toolkit kit = Toolkit.getDefaultToolkit();
Image img = kit.getImage("tubiao.jpg");
frame.setIconImage(img);
input1 = new TextField(10);
input2 = new TextField(10);
input3 = new TextField(10);
input4 = new TextField(10);
input5 = new TextField(10);
box2 = Box.createVerticalBox();
box2.add(input1);
box2.add(Box.createVerticalStrut(8));
box2.add(input2);
box2.add(Box.createVerticalStrut(8));
box2.add(input3);
box2.add(Box.createVerticalStrut(8));
box2.add(input4);
box2.add(Box.createVerticalStrut(8));
box2.add(input5);
box1 = Box.createVerticalBox();
box1.add(new Label("学号:"));
box1.add(Box.createVerticalStrut(8));
box1.add(new Label("姓名:"));
box1.add(Box.createVerticalStrut(8));
box1.add(new Label("生日:"));
5
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库学生成绩管理系统-数据库课程设计(7)在线全文阅读。
相关推荐: