资源简介

基于学生管理系统的ECLIPSE实现,包括论文

资源截图

代码片段和文件信息

package com.baidu;

import java.awt.*; 
import java.awt.event.*; 
import java.io.IOException; 
import java.sql.Connection; 
import java.sql.DriverManager; 
import java.sql.PreparedStatement; 
import java.sql.SQLException; 
import javax.swing.*; 

public class add implements ActionListener ItemListener { 

JLabel lb[]lablelable1; 
JPanel pan[]; 
JComboBox cmb; 
JTextField tf1tf[]; 
JButton bthandin; 
CardLayout card; 

Connection con; 

public add() throws IOException{ 

cmb=new JComboBox (); 
cmb.addItemListener(this); 

card=new CardLayout(); 

tf1=new JTextField(10); 
tf1.setEditable(false); 
lable=new JLabel(“现在进入新增模式“); 
lable.setHorizontalAlignment(JLabel.CENTER); 
lable.setForeground(Color.red); 
lable.setFont(new Font(“华文行楷“Font.BOLD30)); 

bt=new JButton(“下一步“); 
bt.setIcon(new ImageIcon(“but1.gif“)); 
bt.addActionListener(this); 

handin=new JButton(“提交“); 
handin.addActionListener(this); 


//以下初始化各个成员 

lb=new JLabel[7]; 
for(int i=0;ilb[i]=new JLabel(““JLabel.RIGHT); 


tf=new JTextField[5]; 
for(int i=0;itf[i]=new JTextField(3); 



//初始化 pan 
pan=new JPanel[8]; 
for(int i=0;ipan[i]=new JPanel(); 


lb[0].setText(“您要增加几名学生的信息:“); 
lb[1].setText(“请输入您要增加的学生的数目:“); 


//以下进行初级设置 
pan[0].setLayout(card); 
pan[1].setLayout(new GridLayout(41020)); 
pan[2].setLayout(new FlowLayout()); 
pan[3].setLayout(new FlowLayout()); 
pan[4].setLayout(new FlowLayout()); 

//以下进入正题 

cmb.addItem(“只增加一名“); 
cmb.addItem(“增加多名“); 

pan[2].add(lb[0]); 
pan[2].add(cmb); 
pan[3].add(lb[1]); 
pan[3].add(tf1); 
pan[4].add(bt); 
pan[1].add(lable); 
pan[1].add(pan[2]); 
pan[1].add(pan[3]); 
pan[1].add(pan[4]); 

lable1=new JLabel(“请输入学生信息“JLabel.CENTER); 
lable1.setForeground(Color.red); 
lable1.setFont(new Font(“华文行楷“Font.BOLD30)); 

lb[2].setText(“学号 “); 
lb[3].setText(“姓名 “); 
lb[4].setText(“JAVA“); 
lb[5].setText(“C语言“); 
lb[6].setText(“英语“); 
lb[2].setSize(new Dimension(2010)); 

pan[5].setLayout(new BorderLayout()); 
pan[6].setLayout(new GridLayout(53050)); 
pan[7].setLayout(new FlowLayout()); 

pan[6].add(lb[2]); 
pan[6].add(tf[0]); 
pan[6].add(new JLabel(“  “)); 
pan[6].add(lb[3]); 
pan[6].add(tf[1]); 
pan[6].add(new JLabel(“  “)); 
pan[6].add(lb[4]); 
pan[6].add(tf[2]); 
pan[6].add(new JLabel(“  “)); 
pan[6].add(lb[5]); 
pan[6].add(tf[3]); 
pan[6].add(new JLabel(“  “)); 
pan[6].add(lb[6]); 
pan[6].add(tf[4]); 

pan[7].add(handin); 
pan[5].add(“North“lable1); 
pan[5].add(“Center“pan[6]); 
pan[5].add(“South“pan[7]); 
pan[0].add(“card1“pan[1]); 
pan[0].add(“card2“pan[5]); 




public void actionPerformed(ActionEvent e) { 

//******************************************************** 
if(e.getSource()==bt){ 
card.show(pan[0]“card2“); 

//******************************************************** 

if(e.getSource()==handin){ 
try { 
con = 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        672  2008-12-27 14:46  软件0602  刘委 0120610680228\SchoolManager\.classpath

     文件        389  2008-12-27 10:54  软件0602  刘委 0120610680228\SchoolManager\.project

     文件       6319  2008-12-27 15:22  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\add.class

     文件       5609  2008-12-27 15:22  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\correct.class

     文件       5347  2008-12-27 15:22  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\delete.class

     文件       1480  2008-12-27 15:12  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\quit.class

     文件       2898  2008-12-27 15:06  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\safe.class

     文件       6300  2008-12-27 15:31  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\search.class

     文件        658  2008-12-27 15:49  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\studentGUI$WinLis.class

     文件       5077  2008-12-27 15:49  软件0602  刘委 0120610680228\SchoolManager\bin\com\baidu\studentGUI.class

     文件       1885  2008-12-27 15:36  软件0602  刘委 0120610680228\SchoolManager\HELP.txt

     文件     501859  2008-08-29 12:58  软件0602  刘委 0120610680228\SchoolManager\pic\1212.jpg

     文件     375066  2008-01-17 21:13  软件0602  刘委 0120610680228\SchoolManager\pic\123.jpg

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\search.ico

     文件       1992  2008-12-27 14:13  软件0602  刘委 0120610680228\SchoolManager\pic\search.jpg

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\shopping cart full.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\shopping cart.ico

    ..A.SH.    265216  2008-12-27 15:12  软件0602  刘委 0120610680228\SchoolManager\pic\Thumbs.db

     文件       1274  2008-12-27 13:56  软件0602  刘委 0120610680228\SchoolManager\pic\title.jpg

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\tools.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\trash.ico

     文件     354066  2008-01-17 21:13  软件0602  刘委 0120610680228\SchoolManager\pic\untitled1.bmp

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\upload.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\user.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\users.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\wizard.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\zoom in.ico

     文件      13430  2005-05-31 09:50  软件0602  刘委 0120610680228\SchoolManager\pic\zoom out.ico

     文件       4788  2008-12-27 15:22  软件0602  刘委 0120610680228\SchoolManager\src\com\baidu\add.java

     文件       4096  2008-12-27 15:22  软件0602  刘委 0120610680228\SchoolManager\src\com\baidu\correct.java

............此处省略22个文件信息

评论

共有 条评论