資源簡介
主要功能:打開文件或手工輸入獲得學生信息;可以多次添加學生信息;多種方式查找學生信息;修改學生信息;2種模式刪除學生信息;排列方式有總分排名,平均分排名,單科目排名等;查看班級信息,本功能將顯示班級各科平均分,各個分數檔的學生情況,前三名的同學,沒有掛科的同學,掛科了的同學等;總覽學生信息;

代碼片段和文件信息
import?java.io.*;
import?java.awt.*;
import?java.awt.event.*;
import?java.awt.Dimension.*;
import?javax.swing.*;
import?javax.swing.event.*;
import?javax.swing.table.DefaultTableModel;
import?javax.swing.border.*;
public?class?studentM3?extends?Jframe?implements?ActionListenerKeyListenerMouseListener
{
//人數和科目數,方便以后更改
static?final?int?REN=100;
static?final?int?KE=24;
//一組判斷變量?
static?int?pd1=0;
static?int?pd2=0;
static?int?pd3=0;
static?int?pd4=0;
????static?int?pd5=0;
static?int?pd6=0;
static?int[]?pd7=new?int[KE];
static?int?pd8=0;
//整個程序所需要的變量
JLabel?L1=new?JLabel(“??????操作列表如下:“);
JLabel?L2=new?JLabel(““);
????JLabel?L3=new?JLabel(““);
????JLabel?L4=new?JLabel(““);
????JLabel?LL4=new?JLabel(““);
JButton?b1=new?JButton(“輸入學生信息“);
????JButton?b2=new?JButton(“添加學生信息“);
????JButton?b3=new?JButton(“修改學生信息“);
????JButton?b4=new?JButton(“刪除學生信息“);
????JButton?b5=new?JButton(“查找學生信息“);
????JButton?b6=new?JButton(“排列學生名次“);
????JButton?b7=new?JButton(“查看班級信息“);
????JButton?b8=new?JButton(“總覽學生信息“);
????JButton?b9=new?JButton(“首頁“);
????JButton?b10=new?JButton(“退出“);
????JLabel?L5=new?JLabel(“已輸入如下學生信息:“);???
????static?JPanel?p1=new?JPanel(new?FlowLayout());
????static?JPanel?p2=new?JPanel(new?GridLayout(141));
????
????static?String[][]?STR=new?String[REN][KE];
????static?double[][]?STR_f=new?double[REN][KE];
????static?int[][]?STR_m=new?int[REN][KE];
????static?double[]?tal=new?double[REN];
????static?double[]?rag=new?double[REN];
????static?int[]?tal_m=new?int[REN];
????static?int?J=0;
????static?int?m=0;
????static?int?B2=0;
????static?int[]?B=new?int[KE];
????static?String[]?STR2=new?String[REN];
????static?int?x=0;
????JButton?fangda=new?JButton(“放大“);
????
????static?JTable?JT2;
????static?DefaultTableModel?JTM=new?DefaultTableModel();
????static?JScrollPane?JS2=new?JScrollPane(JT2);
????
????//首頁所需要的變量
????static?JTextArea?jta;
????
????//輸入學生信息所需要的變量
????static?boolean?bool=true;
????static?xiancheng1?xc1;
????static?xiancheng2?xc2;
????static?DefaultTableModel?JTM1;
????
????static?JTable?JT1=new?JTable();
????static?JScrollPane?JS1=new?JScrollPane(JT1);
????
????static?CheckboxGroup?bg=new?CheckboxGroup();
????static?Checkbox?jr1=new?Checkbox(“打開文件“truebg);
static?Checkbox?jr2=new?Checkbox(“手工輸入“falsebg);???
????JButton?queding1=new?JButton(“確定“);?
????
????FileDialog?FD1;
????FileDialog?FD2;
????static?File?F1;
????
????JDialog?D1;
????JDialog?D2;
????JDialog?D3;
????JDialog?D4;
????
????JButton?queding4=new?JButton(“確定“);
????static?JTextField[]?tt={
???? new?JTextField(““9)new?JTextField(““9)
???? new?JTextField(““9)new?JTextField(““9)
????????new?JTextField(““9)new?JTextField(““9)
????????new?JTextField(““9)new?JTextField(““9)
????????new?JTextField(““9)new?JTextField(““9)
????????new?JTextField(““9)new?JTextField(““9)
????????new?JTextField(““9)new?JTextField(““9)
????????new?JText
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1525??2009-01-10?18:12??08年期末考試成績表.txt
?????文件??????75534??2009-03-07?09:35??studentM3.java
-----------?---------??----------?-----??----
????????????????77059????????????????????2
評論
共有 條評論